Browse Source

Soft body: drawing kinematic vertices in red

Jorrit Rouwe 1 year ago
parent
commit
bf26139a60
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp

+ 1 - 1
Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp

@@ -682,7 +682,7 @@ SoftBodyMotionProperties::EStatus SoftBodyMotionProperties::ParallelUpdate(SoftB
 void SoftBodyMotionProperties::DrawVertices(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const
 {
 	for (const Vertex &v : mVertices)
-		inRenderer->DrawMarker(inCenterOfMassTransform * v.mPosition, Color::sRed, 0.05f);
+		inRenderer->DrawMarker(inCenterOfMassTransform * v.mPosition, v.mInvMass > 0.0f? Color::sGreen : Color::sRed, 0.05f);
 }
 
 void SoftBodyMotionProperties::DrawEdgeConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const