Madclaws Posted September 18, 2017 Share Posted September 18, 2017 I want to check how much of my second sprite is overlapped with first sprite in callback function,so that i can determine if the overlap is enough for(% of overlapping) for further process.But when i check that with overlapY/overlapX .i am getting 0 always .Please help. Link to comment Share on other sites More sharing options...
samme Posted September 18, 2017 Share Posted September 18, 2017 You need to call physics.arcade.overlap() first, then check overlapX/overlapY. Link to comment Share on other sites More sharing options...
Madclaws Posted September 19, 2017 Author Share Posted September 19, 2017 thanks for replying ,but i called physics.arcade.overlap() .Then I called object1.body.overlapY in its callback function. Link to comment Share on other sites More sharing options...
samid737 Posted September 19, 2017 Share Posted September 19, 2017 Arcade physics bodies are rectangular by default, are you sure their bodies are actually overlapping? You can check with game.debug.body , example: Link to comment Share on other sites More sharing options...
Madclaws Posted September 19, 2017 Author Share Posted September 19, 2017 Ok sorry for the question.Because of Arcade physics being AABB i can't really check collision with rotated objects.So i override phaser's separate function with my own collision checking.So there should be no overlapX.I'm a fool.Sorry again. Between is there any way to check collision of rotated objects in Arcade Physics. Link to comment Share on other sites More sharing options...
Recommended Posts