Chupup Games Posted April 26, 2014 Share Posted April 26, 2014 Hi! I have a player sprite and a group of sprites that should collide. I use arcade physics.It looks like the collision only happens when a member of the group hits the sprite fromthe bottom, the sides and top is ignored. Is that correct or a bug? Greetings, Chupup Link to comment Share on other sites More sharing options...
mraak Posted April 26, 2014 Share Posted April 26, 2014 You can set it explicitly on every body. This example should only report collisions and overlaps if it happens from above. c.body.checkCollision.left = false;c.body.checkCollision.right = false;c.body.checkCollision.down = false; lobsterhands 1 Link to comment Share on other sites More sharing options...
lobsterhands Posted April 26, 2014 Share Posted April 26, 2014 What if you want collision to be in place so the player can't pass through a block, but remove the overlap detection? For example: I want the block to be solid all the way around, and I want a player to get an update if he lands on top of the block, not simply bumps the side. Link to comment Share on other sites More sharing options...
mraak Posted April 26, 2014 Share Posted April 26, 2014 @lobsterhands: In the absence of a better idea, I'd make a composite object with 4 sides and react to every collision differently. lobsterhands 1 Link to comment Share on other sites More sharing options...
lobsterhands Posted April 26, 2014 Share Posted April 26, 2014 Interesting. That gives me some more ideas for the game. Thank you, mraak. Link to comment Share on other sites More sharing options...
Recommended Posts