Jump to content

P2JS Collision BUG


Heron
 Share

Recommended Posts

Hi,

So the problem is you are moving sprites around by manipulating their X and Y coordinates directly, which physics don't like.  If you move a collision box into another one, it attempts to solve to collision but because the velocity of the colliding box is 0, it doesn't make it easy to solve.  That's why you're seeing this kind of strange behavior.   You should be manipulating the player's body velocity instead of X and Y directly.  You probably don't want to reset the player's velocity each tick, as well.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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