New to Bullet SDK advice

Post Reply
Caximus
Posts: 2
Joined: Tue Jan 06, 2015 2:53 pm

New to Bullet SDK advice

Post by Caximus »

Hi Guys,

I'm new to Bullet SDK & have some questions about it's capabilities:

1. Can I have a bounding volume inside another & have inner collisions?
2. If I have a cylinder bounding volume can I change it's center of mass to alter it's rotation?
3. Does Bullet handle collision responses for me or do I have to define these myself?
4. Can I have several bounding volumes for the 1 game object which act differently when colliding with different Game objects?
5. Can I modify the shape of a convex collision hull or do they have to be rigid?
6. Any good books or tutorials you would advise?

cheers
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: New to Bullet SDK advice

Post by drleviathan »

(1) When you say "bounding volume" I translate that to mean "convex shape", so the answer would be: No, convex shapes do not collide on the inside. I think it is possible to have an effectively concave shape (say a hollow box) by using a btCompoundShape with six thin slabs for its walls. Bullet would support internal collisions for such a box.

(2) The position of the btRigidBody is its center of mass. To shift the center of mass of an object you would use a btCompoundShape to back-shift the positions of the child shapes, and then shift the btRigidBody's position. Changing the positions of child shapes inside a btCompound shape is probably not trivial to do on the fly, as per item (5).

(3) Bullet computes realistic collision results for dynamic objects. I assume this is what you mean by "collision response".

(4) I don't think level of detail collisions are supported by Bullet (but someone can correct me if I'm wrong). You'd have to write special code to do this.

(5) The shape of a btCollisionObject can be updated, however the recommended order of operations is something like: remove object from world, change its shape, add object back to world. The reason for this is that the broadphase collision system caches some shape bounds properties and does not support changing them on th e fly. If your shape change doesn't modify the bounds properties then everything would probably work fine without removal/reinsertion, but if those properties did change (in particular, if the new shape bounds extend outside the old) then it is possible that some collisions would sometimes not be properly detected and would other times cause sudden deep penetrations -- undefined behavior basically.

(6) Don't know of any comprehensive resources except the Demos. There are several small tutorials online and I think I saw a short Bullet introduction book once but it looked too shallow for my purposes.
Caximus
Posts: 2
Joined: Tue Jan 06, 2015 2:53 pm

Re: New to Bullet SDK advice

Post by Caximus »

Cheers drleviathan, your info is very helpful
Post Reply