mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:03:57 +02:00
manually removing contact manifolds was a bad idea
This commit is contained in:
parent
532f0683e8
commit
fed03edde3
1 changed files with 0 additions and 6 deletions
|
@ -412,7 +412,6 @@ void PhysicsEngine::bumpAndPruneContacts(ObjectMotionState* motionState) {
|
|||
assert(motionState);
|
||||
btCollisionObject* object = motionState->getRigidBody();
|
||||
|
||||
std::vector<btPersistentManifold*> staleManifolds;
|
||||
int numManifolds = _collisionDispatcher->getNumManifolds();
|
||||
for (int i = 0; i < numManifolds; ++i) {
|
||||
btPersistentManifold* contactManifold = _collisionDispatcher->getManifoldByIndexInternal(i);
|
||||
|
@ -427,7 +426,6 @@ void PhysicsEngine::bumpAndPruneContacts(ObjectMotionState* motionState) {
|
|||
objectA->setActivationState(ACTIVE_TAG);
|
||||
}
|
||||
}
|
||||
staleManifolds.push_back(contactManifold);
|
||||
} else if (objectA == object) {
|
||||
if (!objectB->isStaticOrKinematicObject()) {
|
||||
ObjectMotionState* motionStateB = static_cast<ObjectMotionState*>(objectB->getUserPointer());
|
||||
|
@ -436,13 +434,9 @@ void PhysicsEngine::bumpAndPruneContacts(ObjectMotionState* motionState) {
|
|||
objectB->setActivationState(ACTIVE_TAG);
|
||||
}
|
||||
}
|
||||
staleManifolds.push_back(contactManifold);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto manifold : staleManifolds) {
|
||||
_collisionDispatcher->releaseManifold(manifold);
|
||||
}
|
||||
removeContacts(motionState);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue