Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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 ?