Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Simple gliding physics

Discussion in 'Physics' started by lentinant, Jan 22, 2015.

  1. lentinant

    lentinant

    Joined:
    Jun 18, 2013
    Posts:
    6
    Hi all.
    I want to make simple 2D gliding game, pretty similar to Learn To Fly.
    Can someone tell me base physical principles, that are behind gliding mechanics? Or how can i simulate it, using Unity 2D physics engine?
     
  2. lentinant

    lentinant

    Joined:
    Jun 18, 2013
    Posts:
    6
    Ok, got this video as reference and adapted it for 2D physics. For those who want to use it as well, note, that Vector3.Exclude is no longer present in Unity native methods, so you should use Vector3.ProjectOnPlane instead.
     
  3. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Neat. Any source code somewhere ?
     
  4. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    without looking at the video, i'd do this by applying a constant upward force to the glider, based on it's angle and forward velocity, adjusting it every time either of those changes.
     
  5. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Hmm ok; but still ... how you do it ? any code to share ?