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!