From bf26139a60e683774259337d6596c2abfac40010 Mon Sep 17 00:00:00 2001 From: Jorrit Rouwe Date: Wed, 21 Feb 2024 18:25:14 +0100 Subject: [PATCH] Soft body: drawing kinematic vertices in red --- Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp b/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp index 6da8eb8d9..6780d7920 100644 --- a/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp +++ b/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