Page 1 of 1

Jumping

Posted: Sat May 25, 2013 6:13 pm
by roggie12
How do I make my player jump. I know I need x and y axis but how do I actually make the player go up a certain height and then come back down.
Thanks for your help in advance :awesome:

Re: Jumping

Posted: Sat May 25, 2013 8:17 pm
by Robin
There are a million ways to do that, and which ones work best depends on how the rest of your code is structured, and we can give you in the mean time is some vague ideas or examples.

Do you have gravity already? Half of jumping is falling, and it will be easier if your player already can fall of things.

Also, you need to keep track of whether the player is currently jumping, and the time the jump still has left (because jumping usually takes time, otherwise it looked like the player teleported up rather than jumped).

Re: Jumping

Posted: Sat May 25, 2013 8:21 pm
by roggie12
Thank You. I'm new to love2d so im really bad at it.

Re: Jumping

Posted: Sat May 25, 2013 8:35 pm
by roggie12
Sorry if anyone is finding this topic annoying. I don't know how to delete posts

Re: Jumping

Posted: Thu May 30, 2013 11:38 am
by qaisjp

Re: Jumping

Posted: Sat Jun 01, 2013 4:10 pm
by roggie12

Re: Jumping

Posted: Mon Jun 03, 2013 8:50 pm
by qaisjp
no problem ^_^