Skip to main content
Renders debug overlays for MuJoCo simulation elements — geom wireframes, site markers, joint axes, camera frustums, contact forces, center of mass, and more.
For the distinction between viewer cameras, MuJoCo cameras, offscreen capture poses, and virtualCameras, see Cameras and Captures.

Usage

Props

boolean
default:"false"
Show wireframe outlines of collision geoms.
boolean
default:"false"
Show MuJoCo sites as small octahedrons.
boolean
default:"false"
Show joint axes as colored arrows.
boolean
default:"false"
Show contact force vectors as arrows.
boolean
default:"false"
Show MuJoCo camera positions, frustums, labels, and forward rays from the live cam_xpos / cam_xmat frame.
DebugVirtualCamera[]
default:"[]"
Show explicit virtual camera poses that are not declared as MJCF cameras, such as fixed policy/offscreen render viewpoints created from position, lookAt, up, fov, width, and height.
boolean
default:"false"
Show center of mass markers for each body.
boolean
default:"false"
Show inertia ellipsoids.
boolean
default:"false"
Show tendon paths.
string
default:"#00ff00"
Color for wireframe geoms.
string
default:"#ff00ff"
Color for site markers.
string
default:"#ff4444"
Color for contact force arrows.
string
default:"#ff0000"
Color for center of mass markers.

How It Works

  • Static geometry (geoms, sites, joints) is created once when the model loads
  • Positions are updated every frame using preallocated temp vectors to minimize GC pressure
  • Camera frustums are derived from MuJoCo camera state and are excluded from mounted camera captures
  • Explicit virtual camera frustums from virtualCameras are also excluded from camera captures, so visual debugging does not contaminate policy images
  • Contact arrows use a pre-created pool of 50 ArrowHelper objects — they are shown/hidden and repositioned each frame rather than created and disposed

Example: Debug Panel Toggle

Example: Custom Colors