Skip to main content
Renders contact points as small spheres using InstancedMesh for performance. Useful for debugging contact behavior.

Usage

Customized

Props

number
default:"100"
Maximum number of contact points to render. Limits are important to avoid WASM out-of-memory when reading contact data.
number
default:"0.005"
Sphere radius for each contact marker.
string
default:"#4f46e5"
Color of the contact markers.
boolean
default:"true"
Toggle visibility. Useful for a debug panel toggle.

Notes

  • Contact data is read from data.contact every frame
  • Access is wrapped in try/catch since contact reads can fail if ncon is large
  • The component always checks data.ncon before iterating contacts
  • Uses InstancedMesh for efficient rendering of many small spheres