Difference between revisions of "love.physics.newRopeJoint"
m |
Luckychicken (talk | contribs) m (fixed a typo) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{newin|[[0.8.0]]|080|type=function}} | {{newin|[[0.8.0]]|080|type=function}} | ||
Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies. | 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 == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
Line 22: | Line 22: | ||
* [[parent::love.physics]] | * [[parent::love.physics]] | ||
* [[Constructs::RopeJoint]] | * [[Constructs::RopeJoint]] | ||
+ | * [[Constructs::Joint]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Creates a joint between two bodies that enforces a max distance between them.}} | {{#set:Description=Creates a joint between two bodies that enforces a max distance between them.}} | ||
== Other Languages == | == Other Languages == | ||
{{i18n|love.physics.newRopeJoint}} | {{i18n|love.physics.newRopeJoint}} |
Latest revision as of 14:36, 24 January 2018
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. |
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 each other.
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