Difference between revisions of "love.physics.newPrismaticJoint"

(add new func, explanation based on source & Box2D docs)
 
m (LOVE types have capital first letter.)
Line 8: Line 8:
 
</source>
 
</source>
 
=== 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|bdy2|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 15: Line 15:
 
{{param|number|ay|The y coordinate of the axis vector.}}
 
{{param|number|ay|The y coordinate of the axis vector.}}
 
=== 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]]

Revision as of 18:08, 28 February 2010

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.newGearJoint( body1, body2, x, y, ax, ay )

Arguments

Body body1
The first body to connect with a prismatic joint.
Body bdy2
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