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


  • Recently Browsing   0 members

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