Basic question on collision shapes

shane
Posts: 1
Joined: Tue Jul 21, 2009 4:54 pm

Basic question on collision shapes

Post by shane »

I am just starting with physics engines and so I'm pretty new here. I have a demo that drops boxes on a plane and everything works fine until I increase the collision shape of the box to twice the size. The collision shapes rest on each other and not the box mesh.

I thought the collision shapes are only used to test for collisions then once something passes that collision it checks for collision on the mesh inside of the collision shape. Is that not correct?

Or does is the collision shape suppose to represent the only collision done on that object. Example if I have a sphere, and I put a box collision shape around it, would collision detection be done on the sphere or the box only? (please don't say to not put a box around a sphere, its just and example).

Thanks.
kate
Posts: 41
Joined: Thu Jan 08, 2009 11:20 am
Location: London, UK

Re: Basic question on collision shapes

Post by kate »

Hi Shane,

The collision shape represents the actual surface of the rigid body, which collides with the other objects; the physics engine doesn't know anything about the graphics objects (which I guess is what you mean by the "meshes" you refer to?).

So, if you use a box collision shape, the rigid body will act like a box, regardless of whether it looks (in the graphics display) like a box, a sphere, or a rabbit.

Hope this makes things clearer...

Kate