swissnetizen Posted March 13, 2015 Share Posted March 13, 2015 I'm trying to do some basic ray casting; I have P2 Bodies (some of which are not squares). I plan to use the line.step function to get some points and determine if the line intersects the body. Unfortunately I haven't managed to figure out how we could determine if a point is in the bounds of a P2 body. Link to comment Share on other sites More sharing options...
valueerror Posted March 13, 2015 Share Posted March 13, 2015 game.physics.p2.hitTest({x: 200, y: 300}); this gives you an array of p2 bodies that are underneath the point x:200 and y:300 Link to comment Share on other sites More sharing options...
Recommended Posts