Boost threading and bullet collision shape

jojojijijojo
Posts: 6
Joined: Sun Oct 13, 2013 5:46 pm

Boost threading and bullet collision shape

Post by jojojijijojo »

Hi all,
I use boost to perform the multithreading tasks, and lately I have tried to put the bullet collision shape generation process in a separate thread to get a smooth frame rate. I generate the collision shapes using the btBvhTriangleMeshShape, those shapes are assigned to my infinite terrain tiles that keeps poping up everytime the camera advances in the world.
This seems to be working just fine, the fps is no longer lagging everytime a collision shape is being generated however, I get random crashes generated from the stepsimulation function. In the call stack it seems that its coming from the btDbvtBroadphase::setAabb().
Any ideas?