MikeW Posted April 29, 2017 Share Posted April 29, 2017 Is there a way to get collisions to work with p2, or to go through the list of active bullets and get thier x and y location, Or what do I loose if I switch from p2 to arcade. Thanks Link to comment Share on other sites More sharing options...
MikeW Posted April 30, 2017 Author Share Posted April 30, 2017 I got it, main like of useful code as part of update loop if (weapon.bullets.children[j].alive== 1 && (Math.pow(weapon.bullets.children[j].x-walkers.x,2)+Math.pow(weapon.bullets.children[j].y-walkers.y,2))<225) With the bullet having a radius of 15 pixels. The thing I did not get is bullet information is in weapon.bullets.children Link to comment Share on other sites More sharing options...
Recommended Posts