aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp
diff options
context:
space:
mode:
authorsschirm <[email protected]>2016-12-23 14:20:36 +0100
committersschirm <[email protected]>2016-12-23 14:56:17 +0100
commitef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch)
tree710426e8daa605551ce3f34b581897011101c30f /PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp
parentInitial commit: (diff)
downloadphysx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz
physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp')
-rw-r--r--PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp b/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp
index 1e21f1e3..e1817531 100644
--- a/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp
+++ b/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp
@@ -311,7 +311,11 @@ static void setupFinalizeSolverConstraints(Sc::ShapeInteraction* shapeInteractio
Vec3V rb = QuatRotate(bodyFrame1q, body1Anchor);
Vec3V error =V3Sub(V3Add(ra, bodyFrame0p), V3Add(rb, bodyFrame1p));
- const PxU32 index = c.contactPatches[c.correlationListHeads[i]].start;
+
+ PxU32 index = c.contactID[i][j];
+
+ index = index == 0xFFFF ? c.contactPatches[c.correlationListHeads[i]].start : index;
+
const Vec3V tvel = V3LoadA(buffer[index].targetVel);
{
@@ -478,6 +482,7 @@ static bool reserveBlockStreams(const bool useExtContacts, Dy::CorrelationBuffer
constraintBlock=NULL;
}
}
+ PX_ASSERT((size_t(constraintBlock) & 0xF) == 0);
}
FrictionPatch* frictionPatches = NULL;