Jump to content

How can I make a jump on P2?


sinanqd10
 Share

Recommended Posts

Can anyone guide me the way to do a jump on P2?
 

I have read this article about the jump on P2 http://www.html5gamedevs.com/topic/6148-the-moving-jumpthrough-platform-sum-up-thread-help-very-much-appreciated/, but what I actually wanted is that:

 

I want to jump depend on how I press the key :

 

example: if I press slightly, it will jump a little and if I press hardly, it will jump high.

 

please give me a demo. Thanks you for helping.

Link to comment
Share on other sites

the linked article has little to nothing to do with the jump itself.. its about platforms!

 

player.body.moveUp(600);   does the jump..

 

if you want trigger a jump depending on the pressure of your buttonpress you would need something like a pressure sensitive gamepad for that.. you can't do that with a normal keyboard.. it's digital..  on or off..

 

you probably could try making the jumpheight dependend on the duration of the press....

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...