Difference between revisions of "love.physics.newMotorJoint"
m |
m (Updated for 0.10.1) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{newin|[[0.9.0]]|090|type=function}} | {{newin|[[0.9.0]]|090|type=function}} | ||
− | Creates a joint between two bodies which controls the relative motion between them | + | 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 == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
Line 12: | Line 12: | ||
{{param|Body|body2|The second 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|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 === | === Returns === | ||
{{param|MotorJoint|joint|The new MotorJoint.}} | {{param|MotorJoint|joint|The new MotorJoint.}} |
Latest revision as of 17:13, 12 February 2016
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
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.
Contents
Function
Synopsis
joint = love.physics.newMotorJoint( body1, body2, correctionFactor )
Arguments
Body body1
- The first body to attach to the joint.
Body body2
- The second body to attach to the joint.
number correctionFactor (0.3)
- The joint's initial position correction factor, in the range of [0, 1].
Returns
MotorJoint joint
- The new MotorJoint.
Function
Available since LÖVE 0.10.1 |
This variant is not supported in earlier versions. |
Synopsis
joint = love.physics.newMotorJoint( body1, body2, correctionFactor, collideConnected )
Arguments
Body body1
- The first body to attach to the joint.
Body body2
- The second body to attach to the joint.
number correctionFactor (0.3)
- The joint's initial position correction factor, in the range of [0, 1].
boolean collideConnected (false)
- Specifies whether the two bodies should collide with each other.
Returns
MotorJoint joint
- The new MotorJoint.
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