diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-05-12 17:45:18 -0500 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-05-12 17:45:18 -0500 |
| commit | 7f12de60542edc8f1c6683e6b4cdce8570e51456 (patch) | |
| tree | 0b5d533bae189ea286257b5ab78b635fafb19aa0 /PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp | |
| parent | PhysX 3.4, APEX 1.4 patch release @22017166 (diff) | |
| download | physx-3.4-7f12de60542edc8f1c6683e6b4cdce8570e51456.tar.xz physx-3.4-7f12de60542edc8f1c6683e6b4cdce8570e51456.zip | |
PhysX 3.4, APEX 1.4 patch release @22121272
Diffstat (limited to 'PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp')
| -rw-r--r-- | PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp b/PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp index 3ec7de2d..2e8ee768 100644 --- a/PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp +++ b/PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationHelper.cpp @@ -844,7 +844,7 @@ PxU32 ArticulationHelper::computeUnconstrainedVelocities( const ArticulationSolv FloatV h = FLoad(dt); - const Cm::SpatialVector* acceleration = desc.acceleration; + Cm::SpatialVector* acceleration = desc.acceleration; const Vec3V vGravity = V3LoadU(gravity); @@ -856,6 +856,8 @@ PxU32 ArticulationHelper::computeUnconstrainedVelocities( const ArticulationSolv linearAccel = V3Add(linearAccel, vGravity); Cm::SpatialVectorV a(linearAccel, V3LoadA(acceleration[i].angular)); Z[i] = -ArticulationFnsSimd<ArticulationFnsSimdBase>::multiply(baseInertia[i], a) * h; + //KS - zero accelerations to ensure they don't get re-applied next frame if nothing touches them again. + acceleration[i].linear = PxVec3(0.f); acceleration[i].angular = PxVec3(0.f); } applyImpulses(fsData, Z, getVelocity(fsData)); |