- Home /
Question by
Radical_boy · Feb 27, 2021 at 09:19 AM ·
gravityaddforcedynamicaccelerationforcemode
How do i make the Impulse i give to my Player not be lowered by acceleration of gravity?
I use Dynamic for my RigidBody2D and use that gravity. But the more my player has fallen, when i inflict the Impulse on it, the lower it jumps.
I believe this to be because of the acceleration of gravity. As the impulse is constant, lets say 300 on the Y axis, and the acceleration of the gravity in second 1 is lets say -10 and in second 2, -20. Thus my impulse is less EFFECTIVE. Which i dont want. How can i change that?. Should o add gravity in my script?
Comment
Answer by Llama_w_2Ls · Feb 27, 2021 at 10:19 AM
You could manually set the velocity of the rigidbody on the y axis to zero, then add the force. This way, any previous velocity change is irrelevant to your jump height. @Radical_boy