Skip to main content
Provides handle-based read/write access to a single actuator’s control value by name.

Signature

Usage

Reading in useFrame

Inside useBeforePhysicsStep

Return Value

Notes

  • read() and write() operate directly on data.ctrl — no re-renders
  • For setting multiple actuators at once, use api.setCtrl({ name: value, ... })
  • The actuator index is resolved once on mount
  • The name parameter accepts string by default, or a generated union type if you use mujocoReact()