quarks Posted July 7, 2014 Share Posted July 7, 2014 I have a question about p2 physics. Actually, I have a lot of questions about p2 physics, but I will try and keep the topic relatively focused. I know it is not possible to do something like sprite.touching.top in p2 because the polygonal bodies can have many faces in arbitrary orientations. Is it possible to determine which specific face of one body that another body collided with. From reading other forum posts and examples, I suspect that this can be done by mucking around with contactequations, but I don't really understand the format of that data structure or how it works. Can anyone help either with the specific problem of finding the collision face or the more general task of explaining contactequations? Thanks. Link to comment Share on other sites More sharing options...
wayfinder Posted July 7, 2014 Share Posted July 7, 2014 You could create a line from one shape's center of mass to the other shape's center of mass and iterate over the shape's sides to find the one that it crosses... Link to comment Share on other sites More sharing options...
Recommended Posts