Search Unity

Wing-Physics under-water.

Discussion in 'Physics' started by Igniuss, Apr 14, 2016.

  1. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    I've been calculating the wing-physics for our game using the surface-area of the wing, speed, lift-coeff, and air-density, but obviously it freaks out underwater (since the water-density would be 1000 instead of 1.2 kg/m²..)
    I was wondering how to solve this, without messing with the main rigidbodies drag and angular drag.

    Any ideas?
     
  2. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    in my experience, most planes dont fly under water ;)
     
    Marcos-Schultz likes this.
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    I'm not an expert in this field and I'm not even sure if aerodynamics and hyrdodynamics with regards to lift even relate. I guess in many ways air/water could be thought of as similar (just different densities, compressibility etc) but I'm just not sure if the pressure differences would equate to lift.

    Perhaps just don't use real-world values as it's just a game and use values that look okay. Smoke and mirrors.
     
  4. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    What's going wrong with it? The only difference between water and air in my speedboat simulator is the fluid density and it works fine.

     
  5. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    well, the fluid density is around 1000x higher then above-water, even if I lerp between it, the force-difference is too high and stuff spazzes out. Also, that looks awesome man :D
     
    Todd-Wasson likes this.
  6. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Things will spaz out if the forces are too great relative to the mass of the object. My boat sim works because it's using real numbers for everything (my water is also 1000x denser than air). Could your masses be too small? If I just make a 1 meter cube and drop it in the water as a 1kg mass, it'll freak out too because it's so light. Then you need a much smaller physics time step for it to work.

    It shouldn't need to be crazy though, my boat sim is only running at 100Hz on the physics side.
     
  7. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Here you can see aerodynamics and hydro. The boat is chine walking at high speed and eventually the air blows it over:



    Again, that's having water that's ~1000x denser than the air. Works fine, I suspect your rigid body masses are too low. This is the trouble people get themselves into when they *don't* use real values for physics. Fake one thing and then later it comes back to bite you...