[SOLVED] btBvhTriangleMeshShape Speed In Debug

OpenRealms
Posts: 1
Joined: Thu Mar 10, 2016 5:40 pm

[SOLVED] btBvhTriangleMeshShape Speed In Debug

Post by OpenRealms »

EDIT: After a bit of testing I found the issue. The speed was being directly affected by a malformed btTransform on my ghost object. I naively assumed this transform was being set to identity in it's constructor. After initializing the transform before use my simulation ran at a speed that was just fine. I assume the scale of the transform made the collision tests try against every triangle in the scene.

Mods feel free to delete if you feel there is no useful info here for other people.
Recently picked up Bullet as a solution for a project I'm working on. However I'm unable to achieve any speed that is reasonable while compiling in debug.

My scene itself has one btBvhTriangleMeshShape for terrain and a single btCapsuleShape as a ghost for a character controller.
In debug, each time doing any sort of collision test the time it takes is around 100+ miliseconds for each operation. This makes the simulation so slow that running the game in this state is impossible, and I haven't even thrown anything complex at it.

When I run the simulation in a release things run amazingly fast and there isn't any real delay on the collision calls. This is great, but not being able to run the application in debug isn't acceptable for the project.

I've attempted to scour the forums to see if this is common or for any similar experiences. Although not completely similar, I've gotten the impression this this is par for the course.

So my questions are, is this common for the library or is there some compile setting that I may be missing here? Also if this is common, how do people mitigate this to run their application in a debug setting?