FriarBabs Posted November 23, 2015 Share Posted November 23, 2015 I have two arcade bodies that collide with each other. Is there any way to single out the XY coordinates of the collision that takes place? Thanks much! Link to comment Share on other sites More sharing options...
Batzi Posted November 23, 2015 Share Posted November 23, 2015 Not sure if this is what you want but you can probably start with thisgame.physics.arcade.overlap(body1, body2, getXY, null, this);function getXY(body1,body2){var x = body1.x; //or body2.xvar y = body1.y; //or body2.y}This code simply gets either bodies' coords once they collide. Link to comment Share on other sites More sharing options...
smallma Posted November 25, 2015 Share Posted November 25, 2015 I think Batzi's answer is right there. Link to comment Share on other sites More sharing options...
Recommended Posts