bodies without collision shape?

obi
Posts: 6
Joined: Tue Aug 16, 2005 9:06 am

bodies without collision shape?

Post by obi »

hi,

I wonder if it is possible to make rigid body without collision shape.
I want it b/c my rigid bodies from begining may not have any shape at all, but user should be able to attach collider (with surface paramters) later.

How could I do that with Bullet?
obi
Posts: 6
Joined: Tue Aug 16, 2005 9:06 am

Post by obi »

just after little more playing with bullet I have more question in this topic:

Is it possible to change body properties like shape, mass etc. while program is running?

I've tried to use CcdConstructionInfo for keeping all data about body and then when changing certain properties, I wanted to delete old body and create new using old data. The problem was that CcdPhysicsController deleted its motion state (not that big problem, since I'm responsible for creating it) and rigid body, which couse segfault in proceedDeltaTime.


Just before deep debuging I wanted to ask if I could use bullet that way? Or should store all data needed for creation of body by myself deleting everything after all 'constant' properties changes?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

This feature has been added. You can create an EmptyShape, which doesn't perform any collision detection. During runtime you can replace the collision shape. Please not that you are responsible for keeping the inertia tensor up to date, as well as refreshing the broadphase cache.

For an example how to use this, see the cvs files in sourceforge.net/project/bullet in Demos/CcdPhysicsDemo

Erwin