btCompoundShape additions

sipickles
Posts: 44
Joined: Thu Aug 07, 2008 6:57 am

btCompoundShape additions

Post by sipickles »

Hello,

I am interested in btCompoundShape so I started by looking at the forklift demo.

It appears the collision shapes are combined into a btCompoundShape, then the rigid object is created with the compound shape.

Am I right in thinking that there is no way to ADD a collision shape to an existing rigid body? I would have to destroy and recreate?

Thanks

Simon
mickey
Posts: 107
Joined: Fri Sep 19, 2008 6:08 pm

Re: btCompoundShape additions

Post by mickey »

there's a btRigidBody::setCollisionShape(...) method.

That probably would replace any existing collision shape your body has.

So if you want to add, yes, you probably need to recreate a a new collision shape and set the new collision shape for your body with that method.

hope that helps.