Unity Jump Script

You’re explicitly setting the velocity every frame, which overrides anything else you’ve set. Keep the current y velocity when you set the value and everything should work:

rigidbody.velocity = new Vector3(100f, rigidbody.velocity.y, 0f);

Also, for future posts use code tags: Using code tags properly

1 Like