Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Upward Force from Ground is inconsistent

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

  1. KewlKiddo23


    Jul 29, 2020
    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?