Joint.setTargetAngle

Sets the target angle for a bearing. The bearing will try to reach the target angle with the target velocity and the given amount of impulse/strength.

Kind: Function

Environments: Game

Game

joint:setTargetAngle( targetAngle, targetVelocity, maxImpulse )

Open the full Game reference

The target angle is set to range between -math.pi and +math.pi. The bearing will always try to rotate in the direction closest to the target angle.

This method cancels the effects of setMotorVelocity.

Parameters:

Name Type Description
bearing Joint The bearing.
targetAngle number The target angle.
targetVelocity number The target velocity.
maxImpulse number The max impulse.