From 'transform.Translate' to 'Rigidbody.AddForce'. (Top-Down 3D)

0
I am making a platformer but I want the player character to have a rigidbody so he can correctly collide with other rigidbody objects in the game world.

After transform.Translating the character box (just a placeholder gameObject) I saw that was not the way to go and started AddingRelativeForce to the character (for movement AND for jumping).

However, I ran into multiple issues:

The movement starts off sluggishly
The character jump is not snappy and responsive, but looks and feels as though he were a rocket that’s slowly lifting up
After the character finally picks up speed he quickly becomes uncontrollably fast
How can I achieve a responsive and accurate movement of my rigidbody character? I want the game to feel like Super Mario Bros and not like Little Big Planet (both great games, mind you). Thanks.

if you addforce where you have the transform.translate line in update, it will add physics force EVERY frame, this is why its going crazy :slight_smile:

I believe you are not using enough force to lift the object up. Try adjusting the force applied when jumping.

Also, you seem to be applying the force constantly, possibly within the Update() or FixedUpdate() methods. Create a separate method for jumping, which you will call everytime you get the jump input.

For that I recommend using Input.GetButtonDown(“Jump”). The button for this should be defined within the Input Manager. Edit >> Project Settings >> Input

Hope this helps. :slight_smile: