{{newin|[[0.8.0]]|080|type=function}}
Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies.
{{notice|There is a bug in version 0.8.0 where the coordinates of the anchors are divided by the number from [[love.physics.getMeter]]. As a workaround, multiply your anchor coordinates with that number and it should work like expected.}}
== Function ==
=== Synopsis ===
<source lang="lua">
joint = love.physics.newRopeJoint( body1, body2, x1, y1, x2, y2, maxLength, 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|x1|The x position of the first anchor point.}}
{{param|number|y1|The y position of the first anchor point.}}
{{param|number|x2|The x position of the second anchor point.}}
{{param|number|y2|The y position of the second anchor point.}}
{{param|number|maxLength|The maximum distance for the bodies.}}
{{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with each other.}}
=== Returns ===
{{param|RopeJoint|joint|The new RopeJoint.}}

== See Also ==
* [[parent::love.physics]]
* [[Constructs::RopeJoint]]
* [[Constructs::Joint]]
[[Category:Functions]]
{{#set:Description=Creates a joint between two bodies that enforces a max distance between them.}}
== Other Languages ==
{{i18n|love.physics.newRopeJoint}}