samifruit514 Posted March 31, 2014 Share Posted March 31, 2014 Im trying to figure out how I can add a click event on a sprite arcade body. On p2 physics, there is a hitTest but not on the arcade one. Also, I tried to use input.hitTest but the box is not detected (I think because there is no hitArea property defined). Anyone can help me? Thank you Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Share Posted April 1, 2014 Do you need to check for a click on a Sprite body specifically, or just the Sprite itself? (i.e. via the hitArea?) If you need the Body then you could use:Phaser.Rectangle.contains(sprite.body, x, y); Link to comment Share on other sites More sharing options...
Recommended Posts