Answer the question
In order to leave comments, you need to log in
Why does the character jump all the time to different heights?
void Update()
{
if (Input.GetKey(KeyCode.Space) & isGrounded)
{
rigidbody2D.AddForce(transform.up * jumpForce, ForceMode2D.Impulse);
}
}
Answer the question
In order to leave comments, you need to log in
Let's say you pressed the space bar 2 times and during this time managed to go through 1 FixedUpdate frame, it will count it as 2 jumps
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question