superpowers / superpowers-game

:video_game: Make 2D and 3D games in live collaboration with Superpowers
http://superpowers-html5.com/
Other
402 stars 93 forks source link

[feature] Check if two Arcade Bodies intersect without affecting the bodies #176

Closed notexplosive closed 7 years ago

notexplosive commented 7 years ago

I just want a way to see if an an arcade body is overlapping with another without affecting either of them. I thought this was what ArcadePhysics2D.intersects(body1,body2):boolean did but calling this function makes the bodies move in unanticipated ways.

For instance: I have a box arcade body that could be anywhere on the map. When it's overlapped with the level's arcade body, I want its behavior to change but I don't want them to collide. I just want an isIntersecting boolean.

bilou84 commented 7 years ago

Thanks for the report! The intersects method is indeed supposed to do that and there was a bug in it. Should be now fixed.