Signature
Usage
Reading in useFrame
Inside useBeforePhysicsStep
Return Value
Notes
read()andwrite()operate directly ondata.ctrl— no re-renders- For setting multiple actuators at once, use
api.setCtrl({ name: value, ... }) - The actuator index is resolved once on mount
- The
nameparameter acceptsstringby default, or a generated union type if you usemujocoReact()
data.ctrl. New actuator
metadata includes ctrlAdr, ctrlCount, and ranges. A PID or orientation
actuator can own multiple inputs. Write a complete vector with
api.setCtrl(name, values) or access one input with useCtrl(name, inputIndex).
Calling scalar-only controls on a multi-input actuator without an input selector
throws an actionable error.