|Available since LÖVE 0.8.0|
|This function is not supported in earlier versions.|
Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies.
|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.|
joint = love.physics.newRopeJoint( body1, body2, x1, y1, x2, y2, maxLength, collideConnected )
- The first body to attach to the joint.
- The second body to attach to the joint.
- The x position of the first anchor point.
- The y position of the first anchor point.
- The x position of the second anchor point.
- The y position of the second anchor point.
- The maximum distance for the bodies.
boolean collideConnected (false)
- Specifies whether the two bodies should collide with each other.
- The new RopeJoint.
Tiếng Việt –