Hi
I currently have a problem when using bullet solely for ray casts.
I have a collision world set up, and occasionally move an object by setting its world transform
However, this does not seem to update the broadphase and thus the ray cast is not successfully possible.
If I use performDiscreteCollisionDetection() after the transform update/raytest, the broadphase is updated and works fine.
However, that's not exactly what I want, since this also tests for collisions, thus wasting performance.
So, is there a way to update just the broadphase after a transformation? Didn't find a way...
Updating Broadphase after transforming an object
-
- Posts: 32
- Joined: Fri Dec 19, 2008 2:51 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Updating Broadphase after transforming an object
to update all AABBs you can call:
to update only a single AABB, you can use
Hope this helps,
Erwin
Code: Select all
collisionWorld->updateAabbs();
Code: Select all
void btCollisionWorld::updateSingleAabb(btCollisionObject* colObj);
Erwin
-
- Posts: 32
- Joined: Fri Dec 19, 2008 2:51 pm
Re: Updating Broadphase after transforming an object
Awesome, thanks alot!