I observed that bullet physics StepSimulation is very very slow when a rigidbody with a TriangleMeshShape is fully inside a rigidbody with a simple BoxShape. I noticed that when I move the trianglemeshshape object a bit out of the boxshape my simulation started to run as fast as usual. How can i improve the performance for thats cenario? At some point in my simulation I have to test for all trianglemeshshapes are fully inside a boundingbox. So far i have to do the test on demand and cant just keep the boxshape in the simulation all the time.
I tried using ghostobjects but that didnt help to improve the performance. I assume that the problem lies with the inetrnal working of bullet physics and how the DynamicsWorld performs the collision testing.
Does anyone have an idea how to improve performance for many small trianglemeshShapes inside one big boxshape? all my shapes are kinematic.