Hello!
When I jump with my 3D character and I press several times space (jump), then my character fly up in the air. What’s the problem ?
On the object have mesh collider.
My jump script in FixedUpdate:
if (grounded == true && Input.GetAxis("Jump") > 0)
{
grounded = false;
rb.AddForce(new Vector3(0, jumpHeight, 0));
print("JUMP");
actions.Jump();
}
//check if we are grounded
groundCollisions = Physics.OverlapSphere(groundCheck.position, groundCheckRadius, groundLayer);
if (groundCollisions.Length > 0) grounded = true;
else grounded = false;