I first noticed when I tried adding three large bodies with revolute joints and activated the motors. With motors activated, I get major framerate issues for ~10seconds before the framerate returns to normal.
Suspecting maybe an issue with the revolute joint, I changed the bodies from Dynamic to Kinematic and set the angular velocity directly to rotate them. This resulted in the exact same slow down.
Putting it into a profiler revealed 20% of the frame time being spent on b2DynamicTree::InsertLeaf. Calls to this function drop off dramatically after about 10 seconds the framerate returns to normal.
Any ideas what's going on here?
Suspecting maybe an issue with the revolute joint, I changed the bodies from Dynamic to Kinematic and set the angular velocity directly to rotate them. This resulted in the exact same slow down.
Putting it into a profiler revealed 20% of the frame time being spent on b2DynamicTree::InsertLeaf. Calls to this function drop off dramatically after about 10 seconds the framerate returns to normal.
Any ideas what's going on here?