Sign in to follow this  
Heron

P2JS Collision BUG

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.