Fix issue in ContactManifoldSet.cpp
This commit is contained in:
parent
e725af80b6
commit
a655ffb462
|
@ -60,6 +60,8 @@ void ContactManifoldSet::addContactManifold(const ContactManifoldInfo* contactMa
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
bool addNewManifold = true;
|
||||||
|
|
||||||
// If there are too much contact manifolds in the set
|
// If there are too much contact manifolds in the set
|
||||||
if (mNbManifolds >= mNbMaxManifolds) {
|
if (mNbManifolds >= mNbMaxManifolds) {
|
||||||
|
|
||||||
|
@ -72,14 +74,20 @@ void ContactManifoldSet::addContactManifold(const ContactManifoldInfo* contactMa
|
||||||
|
|
||||||
// Remove the manifold
|
// Remove the manifold
|
||||||
removeManifold(minDepthManifold);
|
removeManifold(minDepthManifold);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
// Create a new contact manifold
|
// The manifold we do not want to get is the new one. Therefore, we do not add it to the set
|
||||||
createManifold(contactManifoldInfo);
|
addNewManifold = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a new contact manifold
|
// If we need to add the new contact manifold
|
||||||
createManifold(contactManifoldInfo);
|
if (addNewManifold) {
|
||||||
|
|
||||||
|
// Create a new contact manifold
|
||||||
|
createManifold(contactManifoldInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user