Difference between revisions of "love.physics.newRevoluteJoint"

Line 13: Line 13:
 
{{param|number|x|The x position of the connecting point.}}
 
{{param|number|x|The x position of the connecting point.}}
 
{{param|number|y|The y position of the connecting point.}}
 
{{param|number|y|The y position of the connecting point.}}
 +
=== Returns ===
 +
{{param|Joint|joint|The new revolute joint.}}
 +
== Function ==
 +
{{newin|[[0.8.0]]|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
joint = love.physics.newRevoluteJoint( body1, body2, x, y, collideConnected )
 +
</source>
 +
=== Arguments ===
 +
{{param|Body|body1|The first body to connect with a Revolute Joint.}}
 +
{{param|Body|body2|The second body to connect with a Revolute Joint.}}
 +
{{param|number|x|The x position of the connecting point.}}
 +
{{param|number|y|The y position of the connecting point.}}
 +
{{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with eachother.}}
 
=== Returns ===
 
=== Returns ===
 
{{param|Joint|joint|The new revolute joint.}}
 
{{param|Joint|joint|The new revolute joint.}}

Revision as of 19:13, 15 September 2011

Create a pivot joint between two bodies.

This joint connects two bodies to a point around which they can pivot.

Function

Synopsis

joint = love.physics.newRevoluteJoint( body1, body2, x, y )

Arguments

Body body1
The first body to connect with a Revolute Joint.
Body body2
The second body to connect with a Revolute Joint.
number x
The x position of the connecting point.
number y
The y position of the connecting point.

Returns

Joint joint
The new revolute joint.

Function

Available since LÖVE 0.8.0
This variant is not supported in earlier versions.

Synopsis

joint = love.physics.newRevoluteJoint( body1, body2, x, y, collideConnected )

Arguments

Body body1
The first body to connect with a Revolute Joint.
Body body2
The second body to connect with a Revolute Joint.
number x
The x position of the connecting point.
number y
The y position of the connecting point.
boolean collideConnected (false)
Specifies whether the two bodies should collide with eachother.

Returns

Joint joint
The new revolute joint.

See Also


Other Languages