Vector3f contactThreshold = Stack.alloc(Vector3f.class);
contactThreshold.set(BulletGlobals.getContactBreakingThreshold(), BulletGlobals.getContactBreakingThreshold(), BulletGlobals.getContactBreakingThreshold());
minAabb.sub(contactThreshold);
maxAabb.add(contactThreshold);
BroadphaseInterface bp = broadphasePairCache;
// moving objects should be moderately sized, probably something wrong if not
tmp.sub(maxAabb, minAabb); // TODO: optimize
if (colObj.isStaticObject() || (tmp.lengthSquared() < 1e12f)) {
bp.setAabb(colObj.getBroadphaseHandle(), minAabb, maxAabb, dispatcher1);
}
else {
// something went wrong, investigate
// this assert is unwanted in 3D modelers (danger of loosing work)
colObj.setActivationState(CollisionObject.DISABLE_SIMULATION);