InstancedMesh for performance. Useful for debugging contact behavior.
Usage
Customized
Props
Maximum number of contact points to render. Limits are important to avoid WASM out-of-memory when reading contact data.
Sphere radius for each contact marker.
Color of the contact markers.
Toggle visibility. Useful for a debug panel toggle.
Notes
- Contact data is read from
data.contactevery frame - Access is wrapped in try/catch since contact reads can fail if
nconis large - The component always checks
data.nconbefore iterating contacts - Uses
InstancedMeshfor efficient rendering of many small spheres