daniel0514 Posted April 20, 2015 Share Posted April 20, 2015 hello everyone, I'm currently working on a snake-like game and I'm having some problems with the collision between the head and the body of the player, the thing is... they're not colliding!! the head just pass through the body. this is the code I'm using to check it: game.physics.arcade.collide(this.player, this.playerBody, this.playerDie, null, this); the body of the snake is set as a group, and the head is just a sprite.. I hope someone can help me! Link to comment Share on other sites More sharing options...
Noid Posted April 21, 2015 Share Posted April 21, 2015 Which version are you using? I've been having trouble with overlaps and collisions between sprites and groups since commit 432516f on the dev branch. Link to comment Share on other sites More sharing options...
daniel0514 Posted April 22, 2015 Author Share Posted April 22, 2015 I'm using phaser 2.3.0 Link to comment Share on other sites More sharing options...
drhayes Posted April 22, 2015 Share Posted April 22, 2015 Did you enable physics on your player sprite, e.g. "game.physics.arcade.enable(this.player);"? Is every child in your group also physics-enabled? Link to comment Share on other sites More sharing options...
daniel0514 Posted April 22, 2015 Author Share Posted April 22, 2015 yes, they all have physics Link to comment Share on other sites More sharing options...
drhayes Posted April 27, 2015 Share Posted April 27, 2015 At this point it's probably best to make a minimal example we can look at and publish it somewhere. I'm at a loss. Link to comment Share on other sites More sharing options...
Recommended Posts