buttonsrtoys Posted September 5, 2015 Share Posted September 5, 2015 I need to test whether any sprites alive in the world are within a box in the world. It doesn't have to be too accurate. E.g., just testing if the center of the sprite is within a the box is sufficient. I started coding a loop that tested the position of every sprite, but realized there was probably a collision test or some other, simple, Phaser way to do it? Link to comment Share on other sites More sharing options...
tips4design Posted September 5, 2015 Share Posted September 5, 2015 Well, as long as you don't want to use any complex data structres, than a loop that tested the position of every sprite is the way to go As long as you don't have tens of thousands of sprites everything should be ok. Link to comment Share on other sites More sharing options...
Recommended Posts