Difference between revisions of "love.physics.newPrismaticJoint"

m
m (Arguments)
Line 2: Line 2:
  
 
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 [[RevoluteJoint| revolute]] joint, but with translation and force substituted for angle and torque.
 
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 [[RevoluteJoint| revolute]] joint, but with translation and force substituted for angle and torque.
 +
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 9: Line 10:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|Body|body1|The first body to connect with a prismatic joint.}}
 
{{param|Body|body1|The first body to connect with a prismatic joint.}}
{{param|Body|bdy2|The second 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|x|The x coordinate of the anchor point.}}
 
{{param|number|y|The y coordinate of the anchor point.}}
 
{{param|number|y|The y coordinate of the anchor point.}}
Line 16: Line 17:
 
=== Returns ===
 
=== Returns ===
 
{{param|Joint|joint|The new prismatic joint.}}
 
{{param|Joint|joint|The new prismatic joint.}}
 +
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Create a prismatic joints between two bodies.
+
{{#set:Description=Create a prismatic joints between two bodies.}}
}}
+
 
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.physics.newPrismaticJoint}}
 
{{i18n|love.physics.newPrismaticJoint}}

Revision as of 18:56, 30 January 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.

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

Joint joint
The new prismatic joint.

See Also


Other Languages