Jump to content

[P2] Moving when player's on platform


micouy
 Share

Recommended Posts

Hi, my problem is collision's callback works only on "bounce" or on the first touch of every collision, idk. My code checks, when player collides platform, then (in other function) if arrow is down it sets sprite's velocity x to 200. This sprite changes velocity only if it "bounces", but doesn't when it's standing on this platform. I set console's log in my function and it also appears, when player is bouncing, not standing . I'm switching from arcade to P2 right now and I'm such a newbie. Could anyone help? (Sorry for my english)

code here: drive.google.com/file/d/0B2GJjU5fsrlgYlNhMjF5eWd2Z2s/view?usp=sharing

demo here: games.praktik.pl/moon/moon.html

Link to comment
Share on other sites

Thanks, I'll see it later. I'm using P2 because of ability of rotating bodies and creating polygons (I want to use triangular shapes of blocks). I'm not going to release my games on mobiles yet, so it's not a problem.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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