Console commands

  • stat Chaos
  • p.Chaos.DebugDraw.Enabled 1
    • Must be called so other commands work
  • p.Chaos.Solver.DebugDrawShapes 1 (engine will call FPBDRigidsSolver::DebugDrawShapes each frame)
    • Red: Not simulated, Static
    • Blue: Not simulated, Movable
    • Yellow: Simulated (Active)
    • Gray: Simulated (Sleeping)
  • p.Chaos.DebugDraw.MaxLines (default to 20000)

For more debug draw methods, see ChaosDebugDraw.cpp file

Draw

Chaos has a special helper for drawing, which is thread safe (under the hood it uses the global draw helpers functions, see DebugDrawChaosCommand).

See Chaos::FDebugDrawQueue and UChaosDebugDrawComponent. Example: Chaos::FDebugDrawQueue::GetInstance().DrawDebugSphere(ParticlePoint, 4, 32, FColor::Yellow);

For p.Chaos.Solver.DebugDrawShapes the drawing root path is FPBDRigidsSolver::PostTickDebugDraw FChaosDDParticle::DrawShapes. See also FChaosDDParticleShape::Draw. FChaosDDParticleShape::GetRenderColor is used if no color is given (default case for engine) and it has multiple checks to know what color to use, most of the case this falls to reading to use FChaosDebugDrawColorsByState::GetColorFromState on DebugDraw::FChaosDebugDrawSettings.