Joint.setTargetLength

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

Kind: Function

Environments: Game

Game

joint:setTargetLength( targetLength, targetVelocity, maxImpulse )

Open the full Game reference

Availability: Server only

The target length is measured in blocks.

This method cancels the effects of setMotorVelocity.

Parameters:

Name Type Description
bearing Joint The bearing.
targetLength number The target length.
targetVelocity number The target velocity.
maxImpulse (optional) number The max impulse. (Defaults to impulse used in game)