Difference between revisions of "love.physics.newRopeJoint"
Line 5: | Line 5: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | joint = love.physics.newRopeJoint( body1, body2, x1, y1, x2, y2, maxLength ) | + | joint = love.physics.newRopeJoint( body1, body2, x1, y1, x2, y2, maxLength, collideConnected ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
Line 15: | Line 15: | ||
{{param|number|y2|The y 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|number|maxLength|The maximum distance for the bodies.}} | ||
+ | {{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with eachother.}} | ||
=== Returns === | === Returns === | ||
{{param|RopeJoint|joint|The new RopeJoint.}} | {{param|RopeJoint|joint|The new RopeJoint.}} |
Revision as of 19:27, 15 September 2011
Available since LÖVE 0.8.0 |
This function is not supported in earlier versions. |
Create a joint between two bodies. Its only function is enforcing a max distance between these bodies.
Function
Synopsis
joint = love.physics.newRopeJoint( body1, body2, x1, y1, x2, y2, maxLength, collideConnected )
Arguments
Body body1
- The first body to attach to the joint.
Body body2
- The second body to attach to the joint.
number x1
- The x position of the first anchor point.
number y1
- The y position of the first anchor point.
number x2
- The x position of the second anchor point.
number y2
- The y position of the second anchor point.
number maxLength
- The maximum distance for the bodies.
boolean collideConnected (false)
- Specifies whether the two bodies should collide with eachother.
Returns
RopeJoint joint
- The new RopeJoint.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info