Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Upward Force from Ground is inconsistent

Discussion in 'Physics' started by KewlKiddo23, Jul 30, 2020.

  1. KewlKiddo23

    KewlKiddo23

    Joined:
    Jul 29, 2020
    Posts:
    1
    I have a 2D platformer where a player controls forces on themselves, and it works in all 4 directions in the air, as well as left and right while on the ground. I'm using AddForce ForceMode.Impulse for this effect. However, when running the part that propells the player upward from ground, it either works or the player doesn't move at all very inconsistently.

    Looking at the Rigidbody velocity Y component in game, it jumps to the set value but then quickly returns to 0. I don't believe it is a scripting error, and it's still inconsistent even after reducing gravity scale.

    Anyway I could fix this?
     
unityunity