Collision detection between PShape and another basic shape

edited May 2015 in How To...

I am currently working on trying to get this to work. Earlier I tried to use pixel detection for an image for collision detection but found out that this does not work when rotating images. Talked to my TA a bit and they recommended me use a Pshape. I made a SVG of the outline of the image I am trying to work with and have that. I am currently trying to find out a few things about this. I was pretty sure this is possible, but the Pshape will be rotating depending on an external source. I tried searching through the forums and on google but I couldn't actually find much regarding SVG files and PShape along with collision between these.

Thanks!

Answers

  • Hello ! As I always told you in the other subject "You should use Box2D to do that."

  • Ahhh thank you so much, I didn't see your previous comment, I'll try it out

  • edited May 2015

    PShape is just an efficient way to draw a lot of things, there is nothing to perform collision detection & collision responses in PShape. But... almost everything in Box2D is based on collision detection & collision responses. That's why I 'm saying you should use it ! :)

  • I've recently started trying out Box2D and it seems very interesting. Is there any way to have an image object using box2D or render the image in box2D? Thanks for the help!

Sign In or Register to comment.