btGImpactMeshShape pieces don't stop

dgoldaraz
Posts: 1
Joined: Sat Sep 10, 2011 7:37 pm

btGImpactMeshShape pieces don't stop

Post by dgoldaraz »

Hi,
I'm new to bullet and I have a problem with the btGImpactMeshShape.

At one point of my program, I create new bodys and I use this type of collision shape.

The problem is that when I put this new bodies in World, they begin to round and move strange.

I try everything (setMargin, set Linear and angular velocity to 0...)

I don't know if the problem can reside in the normals of the mesh that I pass to btGImpactMeshShape.

Anyone have any similar problem??

Thank you
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: btGImpactMeshShape pieces don't stop

Post by dphil »

Are you sure they are not overlapping each other (or other objects) when inserted, which would trigger a collision response? You can also make sure gravity is off if you want to make sure they are staying put (in the lack of collisions) when inserted into the simulation.
User avatar
jarno
Posts: 57
Joined: Tue Mar 16, 2010 1:42 am

Re: btGImpactMeshShape pieces don't stop

Post by jarno »

The centre of mass may be off. Bullet expects that the centre of mass of the mesh be at the origin of the mesh. If that is not the case for your mesh, either move the mesh vertices so that the centre of mass is at the origin, or place the shape in a compound with an offset equal to the negative of the mesh's centre of mass position.

The first option is probably the preferred one, as placing GImpact shapes in compound shapes has some issues with collision detection.

---JvdL---
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: btGImpactMeshShape pieces don't stop

Post by mi076 »

as placing GImpact shapes in compound shapes has some issues with collision detection.
AFAIK, GImpact as child of compound shape.. is supported at all...