MaxHandles Questions

thePoet
Posts: 17
Joined: Tue Apr 15, 2008 4:14 pm

MaxHandles Questions

Post by thePoet »

The constructor for btAxisSweep3 has the following check:

btAssert(maxHandles > 1 && maxHandles < 32767);

We were curious what happens if you go over this limit. We were using 0xFFFE for a while (one less than max unsigned short).
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: MaxHandles Questions

Post by Erwin Coumans »

If you exceed this limit, it will assert in debug mode and crash in release mode.

Simply increase the limit, and if this is not enough, use bt32BitAxisSweep3. If there are a lot of static objects (non-moving triangle meshes), consider to merge them together in a btBvhTriangleMeshShape, to reduce the number of entries in the broadphase.

Hope this helps,
Erwin