I use btDiscreteDynamicsWorld.
I often change setCollisionFlags and add/remove rigidBodies and certain meshes (btBvhTriangleMeshShape) pass some slow moving rigidBodies inside when they should not do that.
I am sure flags are set correctly for collision to happen.
Problem depends on form of the mesh. If I change form then problem disappear. It is very rare problem.
I feel like I must update AABB or some cache. Callbacks for these collisions are not called as well. (struct FilterCallback : public btOverlapFilterCallback )
Could you advice what caches I must clear and how?
or how I must explore/debug such problems.
I was using following 2 broadphases
new btAxisSweep3(worldMin,worldMax);
new btDbvtBroadphase();
Thanks
some rigidBodies go throw static meshes
-
razer
- Posts: 82
- Joined: Sun Apr 04, 2010 10:08 pm
Re: some rigidBodies go throw static meshes
I have many dynamically generated shapes and I wished to reuse them.
I multiplied them on inverse matrix and multiplied body transform on original matrix.
(Center of shapes became (0.f, 0.f, 0.f) instead of different values around of world.
Visually there was no difference and 99% of shapes worked as before but few shapes became physically transparent for certain objects but not all. (I wasn't reusing shapes at that stage. I just centered and rotated them.)
I disabled that "optimization" and everything works fine again.
I do not have skills to understand what was wrong.
I multiplied them on inverse matrix and multiplied body transform on original matrix.
(Center of shapes became (0.f, 0.f, 0.f) instead of different values around of world.
Visually there was no difference and 99% of shapes worked as before but few shapes became physically transparent for certain objects but not all. (I wasn't reusing shapes at that stage. I just centered and rotated them.)
I disabled that "optimization" and everything works fine again.
I do not have skills to understand what was wrong.