You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RP3D_PROFILE("CollisionDetectionSystem::createSnapshotContacts()", mProfiler);
contactManifolds.reserve(contactPairs.size());
contactPoints.reserve(contactManifolds.size());
// For each contact pair
const uint32 nbContactPairs = static_cast<uint32>(contactPairs.size());
for (uint32 p=0; p < nbContactPairs; p++) {
ContactPair& contactPair = contactPairs[p];
// add this continue --------------------------------------------------------------------------
if(contactPair.isTrigger) continue;
// add this continue --------------------------------------------------------------------------
assert(contactPair.nbPotentialContactManifolds > 0);
contactPair.contactManifoldsIndex = static_cast<uint32>(contactManifolds.size());
contactPair.nbContactManifolds = contactPair.nbPotentialContactManifolds;
contactPair.contactPointsIndex = static_cast<uint32>(contactPoints.size());
// For each potential contact manifold of the pair
for (uint32 m = 0; m < contactPair.nbPotentialContactManifolds; m++) {
ContactManifoldInfo& potentialManifold = potentialContactManifolds[contactPair.potentialContactManifoldsIndices[m]];
assert(potentialManifold.nbPotentialContactPoints > 0);
// Start index and number of contact points for this manifold
const uint32 contactPointsIndex = static_cast<uint32>(contactPoints.size());
const uint8 nbContactPoints = potentialManifold.nbPotentialContactPoints;
contactPair.nbToTalContactPoints += nbContactPoints;
// Create and add the contact manifold
contactManifolds.emplace(contactPair.body1Entity, contactPair.body2Entity, contactPair.collider1Entity,
contactPair.collider2Entity, contactPointsIndex, nbContactPoints);
assert(potentialManifold.nbPotentialContactPoints > 0);
// For each contact point of the manifold
for (uint32 c = 0; c < potentialManifold.nbPotentialContactPoints; c++) {
ContactPointInfo& potentialContactPoint = potentialContactPoints[potentialManifold.potentialContactPointsIndices[c]];
// Create a new contact point
ContactPoint contactPoint(potentialContactPoint, mWorld->mConfig.persistentContactDistanceThreshold);
// Add the contact point
contactPoints.add(contactPoint);
}
}
}
}`
When using PhysicsWorld::testCollision on an ordinary capsule collider, I found a static concave trigger collider in the scene could cause this assertion to fail "assert(contactPair.nbPotentialContactManifolds > 0);" So I add a continue. Does it make any sense?
The text was updated successfully, but these errors were encountered:
And @DanielChappuis, I heard you are working on a Character Controller. I would like to offer my game project as a test bed if you are interested. It's a unity PVP (mobile/pc) MOBA like game and I got your engine compiled on Android/iOS/Windows10. Give me your email address if you are in. I give full access.
CollisionDetectionSystem.txt
`void CollisionDetectionSystem::createSnapshotContacts(Array& contactPairs,
Array& contactManifolds,
Array& contactPoints,
Array& potentialContactManifolds,
Array& potentialContactPoints) {
}`
When using PhysicsWorld::testCollision on an ordinary capsule collider, I found a static concave trigger collider in the scene could cause this assertion to fail "assert(contactPair.nbPotentialContactManifolds > 0);" So I add a continue. Does it make any sense?
The text was updated successfully, but these errors were encountered: