shape Collision detection

Hi all,

I’ve been racking my brains over this for a few days and finally realised I need a bit of help :slight_smile:

I am trying to create a program that allows you to create different shapes, circle, square and triangles and have them bounce around screen with some basic physics and collision. I’ve worked the basics out but want to take it to the next level. I now need the squares and triangles to react in a real world way by rotating and bouncing off different sides( I also need to store which side was hit)

i have been looking at ofxmsaphysics (also looked at box2d but think this is a little bit above my knowledge at the moment).

Am I able to achieve the above with an add on or will I have to write something a bit more bespoke if so could someone point me in the right direction or suggestion a good starting point

thanks for your time


hi lloydy,

Did you try to use ofxBox2d of Todd Vanderlinn? This is really simple addon which wraps around box2d. You can create rectangles, polygons and circles with wrapper functions. Hope this helps you a bit.


Hi roxlu,

thanks for the quick reply, this looks perfect, as i said can’t quite get my head round box2d yet so this will be a great help, will give it a try later