Continuous jumping?

Hi Unity community,

I am using the built in Unity5 character controller/motor and use the Jump feature/option to great effect but I want my character to jump much higher and continue to go up up up…should the player hold spacebar down. Has anyone ever done this and have a code sample or way of doing this they could share? Would it be as simple as:
If(Input.onKeyDown(Keys.Spacebar)) {jkumping==true}

Thanks for any help.

For this, you’ll want to use Input.GetKey(Keys.Spacebar), not GetKeyDown. GetKeyDown returns true only when the key goes from up to down. GetKey will return true if the key is down on the current frame.