how to destroy

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
gnovosel
Posts: 5
Joined: Wed Oct 28, 2009 9:58 am

how to destroy

Post by gnovosel »

Hi.

I'm trying to destroy (delete, remove from the world) dynamic body. How to do that?
(I tried RigidBody.destroy(), but it doesn't do the trick)

Thank you.
gnovosel
Posts: 5
Joined: Wed Oct 28, 2009 9:58 am

Re: how to destroy

Post by gnovosel »

Anybody?

Thank you
Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

Re: how to destroy

Post by Verbo »

Hi,

Well, what is usually done is simply to call removeCollisionObject on your btDiscreteDynamicsWorld instance to remove the btRigidBody pointer from the physic world, and then to delete this btRigidBody pointer.

That`s what I do in my integration of bullet.

Also, take a look at the bullet demos, you will see plenty of example to help you figure those details.

Verbo