Jump to content

Collision broke after a big game update and I don't know why


Recommended Posts

I just want the player sprite to not be able to overlap block sprites. Both sprites have:

sprite.body.enable = true;
sprite.anchor.setTo(0.5, 0.5);

and the blocks have "blocksprite.body.immovable = true;" Every game update has these two functions:

game.physics.arcade.collide(PlayerSprite, BlocksSpriteGroup, collisionManager.handleBumpIntoBlock, null, this);
game.physics.arcade.overlap(PlayerSprite, BlocksSpriteGroup, collisionManager.handleBumpIntoBlock, null, this);

I've tried every permutation of only collide, only overlap, individual sprites, and groups. Every time the collisionManager.handleBumpIntoBlock function is definitely getting called, but the sprites always pass through each other. Collisions with world boundaries do work fine, it's just players not colliding with blocks that's the problem. The weirdest thing is that the update didn't even touch the collision or even players. It mainly altered the inventory system and how socket.io handles multiple players. Everything was working fine until that update. Anyone have any ideas?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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