functiongenerated
Physics.set_hinge_motor
Selects velocity mode on an authored 2D hinge owner and sets its relative angular velocity target in radians/second and finite non-negative torque cap. Positive turns the second body counterclockwise relative to the first. Zero torque disables the motor (it coasts rather than brakes). Applied at the next fixed synchronization, including before endpoints are built; persists through rebuilds. Invalid values leave the component unchanged. Needs physics and a hinge component on the owner.
Signature
Physics.set_hinge_motor(joint: Entity, velocity: number, max_torque: number) -> unitMember of Physics
Related types
- Source
- docs/generated/decay-api.json
- Schema
- v1
- Engine version
- 0.1.0
- Source commit
909aca81368b