Answer the question
In order to leave comments, you need to log in
Jumping and moving forward a Unity2d character?
Good day! I would like to ask how to implement so that the character can jump and move forward at the same time when pressing one space ? And the second point, how to make the jump force when holding the space bar?
The game will be something like a jumper game in VK only 2d.
Vector2 jump = (transform.up * jumpForce) + (transform.right * 50);
if (Input.GetKeyUp(KeyCode.Space))
{
rb.AddForce(jump, ForceMode2D.Impulse);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question