I am making a game where you are being chased by other cars, and I want the Player car to jump.
can someone help?
I tried several different ways for my car, but ultimately ended up with (assuming you’re using a rigidbody):
if (Input.GetButtonDown("Jump"))
{
rigidbody.velocity.y = 15;
}
It may not be the best way to do it, but it works for me. You should replace the “15” with a public variable so you can easily test the jump height by changing the number in the inspector.