Difference between revisions of "love.physics.newGearJoint"
(Adding Constructs::Joint for consistency with Shapes.) |
m |
||
Line 1: | Line 1: | ||
− | Create a | + | Create a [[GearJoint]] connecting two Joints. |
The gear joint connects two joints that must be either [[PrismaticJoint| prismatic]] or [[RevoluteJoint | revolute]] joints. Using this joint requires that the joints it uses connect their respective bodies to the ground and have the ground as the first body. When destroying the bodies and joints you must make sure you destroy the gear joint before the other joints. | The gear joint connects two joints that must be either [[PrismaticJoint| prismatic]] or [[RevoluteJoint | revolute]] joints. Using this joint requires that the joints it uses connect their respective bodies to the ground and have the ground as the first body. When destroying the bodies and joints you must make sure you destroy the gear joint before the other joints. | ||
Line 37: | Line 37: | ||
* [[Constructs::Joint]] | * [[Constructs::Joint]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description=Create a | + | {{#set:Description=Create a [[GearJoint]] connecting two Joints.}} |
{{#set:Since=000}} | {{#set:Since=000}} | ||
== Other Languages == | == Other Languages == | ||
{{i18n|love.physics.newGearJoint}} | {{i18n|love.physics.newGearJoint}} |
Revision as of 18:00, 29 May 2013
Create a GearJoint connecting two Joints.
The gear joint connects two joints that must be either prismatic or revolute joints. Using this joint requires that the joints it uses connect their respective bodies to the ground and have the ground as the first body. When destroying the bodies and joints you must make sure you destroy the gear joint before the other joints.
The gear joint has a ratio the determines how the angular or distance values of the connected joints relate to each other. The formula coordinate1 + ratio * coordinate2 always has a constant value that is set when the gear joint is created.
Contents
Function
Available since LÖVE 0.8.0 |
This variant is not supported in earlier versions. |
Synopsis
joint = love.physics.newGearJoint( joint1, joint2, ratio, collideConnected )
Arguments
Joint joint1
- The first joint to connect with a gear joint.
Joint joint2
- The second joint to connect with a gear joint.
number ratio (1)
- The gear ratio.
boolean collideConnected (false)
- Specifies whether the two bodies should collide with each other.
Returns
GearJoint joint
- The new gear joint.
Function
Removed in LÖVE 0.8.0 |
This variant is not supported in that and later versions. |
Synopsis
joint = love.physics.newGearJoint( joint1, joint2, ratio )
Arguments
Joint joint1
- The first joint to connect with a gear joint.
Joint joint2
- The second joint to connect with a gear joint.
number ratio (1)
- The gear ratio.
Returns
Joint joint
- The new gear joint.
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