Jump to content

Static Body Collision Detection Not Working Correctly


Recommended Posts

I have a ground as a static body  (gamePhysics is my game physics I save globally)

platform = gamePhysics.add.staticImage(gameCenterX, (boundsHeight * .5) - levelObject.platformYDifference, 'layerOne', ('Platform' + imageExtension));
platform.setOrigin(.5, 1);


I have a character container that has gravity and is supposed to collide with the platform, but it doesn't act as expected. It seems to fall onto the platform and slowly pass through and then continue on after it passes all the way through.

mainCharacterContainer = gameAdder.container(gameCenterX, 300);


This is in my main update method

gamePhysics.collide(mainCharacterContainer, platform});


Link to comment
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.

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.


  • Recently Browsing   0 members

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