I'm creating a custom movement system for a platforming character.
This is the Jumping.
The problem is that when I hold down the space bar, the Player rises into the air, not falling until the spacebar is released.
What I want to happen is for the player to do one jump per each press of the spacebar, no matter how long it is held down.
I can't see why it doesn't do that with this piece of code...
When the spacebar is pressed it sets Jumping to true, which should prevent the velocity from increasing until the spacebar is released and jumping is set to false again. But it doesn't do that. The player just keeps on rising into the air.
Pls help.
<img src="http://imgur.com/X0Mz62G.jpg" border="0" />