Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm beginning Bullet3D. Can I change collision shape of a rigid body after it created? A rigid body accepts a collision shape when it's creating, but it's hard to find options changes the collision shape of an instance.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

There are setCollisionShape() and setMassProps() method for this on btRigidBody class.

share|improve this answer
1  
setCollisionShape doesn't appear in the documentation, except in a code snippet as a private method -- is the documentation out of date or just missing that method? –  Josh Petrie May 5 '11 at 15:30
1  
@Josh This is completely my guessing. I don't think the BulletPhysics have well reference document. (except user guide) Because there are some mismatch points in doc against real code, and there're many people complaining about its doc quality. And even the author confirmed it. It's obvious the doc is not syncing with recent code. IMHO, the author does not care about documentation so much. So I just followed the rule "Source is the documentation" as like many open-source projects. I don't like this kind of hacking, but I believe that the author may don't have enough time to manage to doc. –  Eonil Jun 7 '11 at 16:40

As far as I know, you can't. You'd have swap out the entire rigid body object, I would imagine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.