Title says it all, really!
How do I make it so when the player commits to a jump, he jumps in that direction until he lands?
Many thanks.
Noob
Develop games in your browser. Powerful, performant & highly capable.
It's hard to say what might be wrong without looking at your project, Have a look at this, might helps.
Thank you for replying.
I'm talking about the pseudo physics of platformer jumps. I want to get away from the jump method in your example (being able to change direction mid-air), and want to jump like Miner Willy does in this example - http://torinak.com/qaop#!jetsetwilly. So once you start to jump, you can't change direction until you land.
Playing keys in that game are Q/W - Left/Right and Space to jump.
Set your acceleration and decceleration to 0 on jump, store it to a temporary variable, then reassign it back on land.
Have a look at this example: 1drv.ms/u/s!AkmrWgxeuxlKhIdZkdKXU98ZoXEpUg
In this example the sideways movement when jumping is set to the vector X of the player when the jump key was pressed. This means that jump length is variable depending on how fast you were moving before you jumped.
If you want to make it the same distance each time just set the vector.X in events 10 & 11 to the number you want, not the variable.