Check that proxy-shape is part of broad-phase before updating it in RigidBody
This commit is contained in:
parent
0e563f0283
commit
061469a539
|
@ -552,6 +552,9 @@ void RigidBody::updateBroadPhaseState() const {
|
|||
// For all the proxy collision shapes of the body
|
||||
for (ProxyShape* shape = mProxyCollisionShapes; shape != nullptr; shape = shape->mNext) {
|
||||
|
||||
// If the proxy-shape shape is still part of the broad-phase
|
||||
if (shape->getBroadPhaseId() != -1) {
|
||||
|
||||
// Recompute the world-space AABB of the collision shape
|
||||
AABB aabb;
|
||||
shape->getCollisionShape()->computeAABB(aabb, mTransform * shape->getLocalToBodyTransform());
|
||||
|
@ -560,6 +563,7 @@ void RigidBody::updateBroadPhaseState() const {
|
|||
mWorld.mCollisionDetection.updateProxyCollisionShape(shape, aabb, displacement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef IS_PROFILING_ACTIVE
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user