Player should jump a fixed arc

Hi

Is there any way to make the player jump a fixed arc e.g. (x)3far and (y)1 high.

Because now I m using this :

rb2d.velocity = new Vector2(0f, jumpSpeed);

and I have an auto runner where the player gets faster :

He jumps to far when he’s faster and not far enough when he’s slower.

If you’re using velocity on a rigidbody, you’re using the physics simulation, which means the results are going to be calculated along the way. You’re not going to get the same result every time.

You could position the object exactly across some duration, in a coroutine for example, but because you’re using Rigidbodies some care will have to be made. You should be able to use ‘Rigidbody.MovePosition’ most likely.

Lets just say this though… whatever you go with, it’s going to be a LOT more than just that single line of code above.