Hi
I have been experimenting with the collisions side of Bullet Physics. It worked fine initially. However I am trying to figure a strange behaviour I found recently.
I am working with RigidBody collisions without the physics simulations. The issue I am having happens after applying multiple transformations in some cases e.g. scaling after translation - if that happens then no collision gets detected. However, it works fine when applying a single transformation or when the first transformation is the same for both objects.
General layout of the process: create world and rig bodies, apply transformations to center of mass and updating aabb, perform contact tests.
Strangely if I set the initial shape size to the scaling I want and only apply translation the detection works. Even though the final vertices are the same as in the two-step transformation. I am getting the vertices by multiplying by the object world transform.
Any idea what might be the issue here - or what I am missing?
Thanks for your help.
Multiple transformations
-
- Posts: 7
- Joined: Sun Mar 11, 2018 9:34 am
Re: Multiple transformations
If you are just using it for collision detection (everything is inactive) perhaps the broadphase doesn't see a need to update the AABB's after they are initially inserted.
Try calling btCollisionWorld::updateAabbs() after you have moved your bodys.
You probably need m_forceUpdateAllAabbs on if you aren't running simulation.
Try calling btCollisionWorld::updateAabbs() after you have moved your bodys.
You probably need m_forceUpdateAllAabbs on if you aren't running simulation.