Too high forces to move

Hi All,

I’m making some code from the tutorial (character movements and jumps) and here is how it’s imlemented:

fighter.Body.AddRelativeForce(new Vector3(0, VerticalForce, 0));
...
fighter.Body.AddRelativeForce(new Vector3(HorizontalForce, 0, 0));

Where Body is Rigidbody2D.
VerticalForce and HorizontalForce are set in the editor.

Original tutorial is 3d, but my version is 2d, so I have every physics item in 2d (box collider instead of capsule collider etc). Original values are about 50-180, but I decreased them to 4-8. Anyway, my character jumps and moves with too high forces.

For example, I press the left arrow, my character moves left too high. When I release the left arrow, it must stop, but is continues to move. Values < 1 don’t work at all - character doesnt move or jump.

How can I fix that and make smooth movement?
Thanks!

You can start by increasing the mass of your rigidbody, and then adding more drag forces to help them stop faster after you release input.

If you’re looking for Megaman style instant-control though, you’ll want to just set the velocity directly.

Hi GroZZleR, thanks for the reply!
Don’t know about Megaman. I need just a simple controller - moving, jumping etc. Will try to set mass. Thanks!