Jumping with gravity

Hi, I’m making a jumping game with physics, but I have a problem controling the height of the jump.

I have a character jumping from platform to platform, if he misses a platform the player looses.

This currently works great but I’m using a rigidbody to push the character downwards and then adding force to push him up again.

The problem with this is that depending on the distance the character falls the height he will jump is always different. I want this to always be the same height!

Thus,
is there any way to ignore the previous physics while adding force to the object?

You would use rigidbody.AddForce.

I’m using that but the height of the jump is always different depending on the distance the character falls.

Are there any other ways of adding force with ignoring the previous gravity calculations?

Start by setting rigidbody.velocity.y to 0, then add the force. I think this will do it for you. You just want to eliminate the effect of any existing momentum in the jump if I understand correctly?

I just set the rigidbody’s velocity.

rigidbody.velocity.y = 20;