Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Need help trying to implement movement on ice

Discussion in 'Physics' started by juicedup, Oct 31, 2022.

  1. juicedup

    juicedup

    Joined:
    Aug 18, 2019
    Posts:
    47
    I'm trying to make "slippery/ice controls"
    Basically the player can't change direction immediately; slow acceleration and deceleration.
    currently I'm using rigidbody2d.addforce(direction * force) on a rigidbody2d that has small amount of linear drag in fixed update is there a better way? will this cause any problems?
    and if I want to switch to normal controls I would just set the rigid body's velocity directly, right?
    I also heard that vector2.smoothdamp sort of acts like acceleration, will that work better?
     
  2. juicedup

    juicedup

    Joined:
    Aug 18, 2019
    Posts:
    47
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,507
    You're asking for a "better way" but what's wrong with what you're doing? Why does there have to be a "better way"?

    Forums are suited to answering specific questions to specific problems.