Difference between revisions of "love.physics.newPrismaticJoint"
(Changed return type.) |
|||
Line 15: | Line 15: | ||
{{param|number|ax|The x coordinate of the axis vector.}} | {{param|number|ax|The x coordinate of the axis vector.}} | ||
{{param|number|ay|The y coordinate of the axis vector.}} | {{param|number|ay|The y coordinate of the axis vector.}} | ||
+ | === Returns === | ||
+ | {{param|PrismaticJoint|joint|The new prismatic joint.}} | ||
+ | == Function == | ||
+ | {{newin|[[0.8.0]]|type=variant}} | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | joint = love.physics.newPrismaticJoint( body1, body2, x, y, ax, ay, collideConnected ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|Body|body1|The first body to connect with a prismatic joint.}} | ||
+ | {{param|Body|body2|The second body to connect with a prismatic joint.}} | ||
+ | {{param|number|x|The x coordinate of the anchor point.}} | ||
+ | {{param|number|y|The y coordinate of the anchor point.}} | ||
+ | {{param|number|ax|The x coordinate of the axis vector.}} | ||
+ | {{param|number|ay|The y coordinate of the axis vector.}} | ||
+ | {{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with eachother.}} | ||
=== Returns === | === Returns === | ||
{{param|PrismaticJoint|joint|The new prismatic joint.}} | {{param|PrismaticJoint|joint|The new prismatic joint.}} |
Revision as of 19:15, 15 September 2011
Create a prismatic joints between two bodies.
A prismatic joint constrains two bodies to move relatively to each other on a specified axis. It does not allow for relative rotation. Its definition and operation are similar to a revolute joint, but with translation and force substituted for angle and torque.
Contents
Function
Synopsis
joint = love.physics.newPrismaticJoint( body1, body2, x, y, ax, ay )
Arguments
Body body1
- The first body to connect with a prismatic joint.
Body body2
- The second body to connect with a prismatic joint.
number x
- The x coordinate of the anchor point.
number y
- The y coordinate of the anchor point.
number ax
- The x coordinate of the axis vector.
number ay
- The y coordinate of the axis vector.
Returns
PrismaticJoint joint
- The new prismatic joint.
Function
Available since LÖVE 0.8.0 |
This variant is not supported in earlier versions. |
Synopsis
joint = love.physics.newPrismaticJoint( body1, body2, x, y, ax, ay, collideConnected )
Arguments
Body body1
- The first body to connect with a prismatic joint.
Body body2
- The second body to connect with a prismatic joint.
number x
- The x coordinate of the anchor point.
number y
- The y coordinate of the anchor point.
number ax
- The x coordinate of the axis vector.
number ay
- The y coordinate of the axis vector.
boolean collideConnected (false)
- Specifies whether the two bodies should collide with eachother.
Returns
PrismaticJoint joint
- The new prismatic 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