Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Ski Physics

Discussion in 'Physics' started by NickWu, Mar 30, 2016.

  1. NickWu


    May 7, 2013
    Hello everyone.

    Does anyone have experience on creating skiing physics?
    I'm currently working on a training scenario for a ski-chair, but having problem on creating a believable skiing experience.
    The purpose this game is to help player to get use to the ski-chair control and have a good idea how should they handle different terrain when they are on the actual ski-chair.
    And since it is a ski-chair, it drives more like a vehicle, the only control available to the player would be adjusting the ski angles.
    i.e. no jump-turn, no leaning steer, etc.
    For that reason, the game doesn't need to 100% physically accurate, but still need to be able to present most of the basic physics attributes of a ski chair.

    My first attempt was to use a car prefab to fake the skiing physics by taking out the engine, adding braking force when the ski is in "/ \"(pizza) shape, lower braking force when the ski is in "| |"(french fries) shape etc.
    The result was not great, but acceptable back then.

    And as the project moved on, we migrated from Unity 4 to Unity 5, which drastically changed the physics properties, and the old settings are no longer usable.

    So I took that chance to try to create my own skiing controller script.
    But since I only skied for a couple of times in my life and most of my physics knowledge were gone with the years, I was struggling on this task.

    So this is what I did:
    Setup the physical material of the ski so it has really low dynamic friction, so the ski-chair will now slide down the slope due to gravity.

    And then I separate the gravity force into different forward and side-way components, so I can apply higher drag on side-way component to make the ski-chair doesn't slide side-way too much.

    That's the basic part for the ski-movement, pretty straight forward, but what's been bothering me a lot is the steering part.

    There are so many different factor that affect the steering, here are the ones that I came up with (probably not correct):
    • The ski angles (they have different turning radius depends on the current ski condition, i.e. pizza, french fries)
    • Current velocity of the ski-chair, i.e. ski-chair in stationary shouldn't be able to turn, higher speed should result in lower steering efficiency
    • Local Slope
    • Fall-line Slope
    • Fall-line Direction, i.e. when the ski-chair is running down hill without active steering, the ski-chair should steer itself towards the direction of the Fall-line
    I calculate the steering force base on above factors and a bunch of magic numbers and then apply them by AddRelativeTorque().

    This is where I'm currently at:

    The result is acceptable, but the steering still feels a little bit off.
    I'm wondering if I missed any important factors, or is there a better way to implement a skiing physics.

    Any help or advice would be greatly appreciated.
    Last edited: Mar 30, 2016
    Kjelle69 and unity-nikkolai like this.
  2. Kjelle69


    Nov 9, 2016
    I think it looks fantastic, how did this project come out in the end?