- Home /
Mulltiple jumps
How do I make the character jump continuously while holding down the space bar? Hugo
Answer by MousePods · Mar 25, 2014 at 01:14 AM
if (Input.GetKey("space"))
{
Jump();
}
Of course, in the Jump function, check if their grounded. If they are, jump! Once their grounded again, allow them to jump again unless this is a jetpack where they continue to move upwards as they hold down space.
Hope this helps!
I am new to unity, can you tell me where to type this in? thanks!
Then before giving writing a game in Unity a go, you should check out these tutorials! (You will learn how to build a mario clone which has jumping =])
Add a rigidbody component to your player, add a new component/script on it too and inside it your write the thing above and something like rigidbody.AddForce(Vector3.up * 10).
Your answer
Follow this Question
Related Questions
Movement/Jump help 1 Answer
When I Hold The Jump Button, Player Will Fly? 2 Answers
Jumping not allways registering fix? 0 Answers
Why when i press space button nothing was happened 0 Answers
fps jump Brackeys 0 Answers