{{newin|[[0.9.0]]|090|type=function}}
Creates a joint between two bodies which controls the relative motion between them.

Position and rotation offsets can be specified once the MotorJoint has been created, as well as the maximum motor force and torque that will be be applied to reach the target offsets.
== Function ==
=== Synopsis ===
<source lang="lua">
joint = love.physics.newMotorJoint( body1, body2, correctionFactor )
</source>
=== Arguments ===
{{param|Body|body1|The first body to attach to the joint.}}
{{param|Body|body2|The second body to attach to the joint.}}
{{param|number|correctionFactor (0.3)|The joint's initial position correction factor, in the range of [0, 1].}}
=== Returns ===
{{param|MotorJoint|joint|The new MotorJoint.}}

== Function ==
{{newin|[[0.10.1]]|101|type=variant}}
=== Synopsis ===
<source lang="lua">
joint = love.physics.newMotorJoint( body1, body2, correctionFactor, collideConnected )
</source>
=== Arguments ===
{{param|Body|body1|The first body to attach to the joint.}}
{{param|Body|body2|The second body to attach to the joint.}}
{{param|number|correctionFactor (0.3)|The joint's initial position correction factor, in the range of [0, 1].}}
{{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with each other.}}
=== Returns ===
{{param|MotorJoint|joint|The new MotorJoint.}}

== See Also ==
* [[parent::love.physics]]
* [[Constructs::MotorJoint]]
* [[Constructs::Joint]]
[[Category:Functions]]
{{#set:Description=Creates a joint between two bodies which controls the relative motion between them.}}
== Other Languages ==
{{i18n|love.physics.newMotorJoint}}