diff options
Diffstat (limited to 'PhysX_3.4/Source/PhysXExtensions/src/ExtFixedJoint.cpp')
| -rw-r--r-- | PhysX_3.4/Source/PhysXExtensions/src/ExtFixedJoint.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/PhysX_3.4/Source/PhysXExtensions/src/ExtFixedJoint.cpp b/PhysX_3.4/Source/PhysXExtensions/src/ExtFixedJoint.cpp index bee99ed2..980721c1 100644 --- a/PhysX_3.4/Source/PhysXExtensions/src/ExtFixedJoint.cpp +++ b/PhysX_3.4/Source/PhysXExtensions/src/ExtFixedJoint.cpp @@ -93,14 +93,17 @@ void FixedJointVisualize(PxConstraintVisualizer& viz, const void* constantBlock, const PxTransform& body0Transform, const PxTransform& body1Transform, - PxU32 /*flags*/) + PxU32 flags) { - const FixedJointData& data = *reinterpret_cast<const FixedJointData*>(constantBlock); + if(flags & PxConstraintVisualizationFlag::eLOCAL_FRAMES) + { + const FixedJointData& data = *reinterpret_cast<const FixedJointData*>(constantBlock); - const PxTransform& t0 = body0Transform * data.c2b[0]; - const PxTransform& t1 = body1Transform * data.c2b[1]; + const PxTransform& t0 = body0Transform * data.c2b[0]; + const PxTransform& t1 = body1Transform * data.c2b[1]; - viz.visualizeJointFrames(t0, t1); + viz.visualizeJointFrames(t0, t1); + } } |