Difference between revisions of "love.physics.newFrictionJoint"

m
m
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{newin|[[0.8.0]]|080|type=function}}
 
{{newin|[[0.8.0]]|080|type=function}}
Create a friction joint between two bodies. A FrictionJoint applies friction to a body.
+
Create a friction joint between two bodies. A [[FrictionJoint]] applies friction to a body.
  
 
== Function ==
 
== Function ==
Line 12: Line 12:
 
{{param|number|x|The x position of the anchor point.}}
 
{{param|number|x|The x position of the anchor point.}}
 
{{param|number|y|The y position of the anchor point.}}
 
{{param|number|y|The y position of the anchor point.}}
 +
{{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with each other.}}
 +
=== Returns ===
 +
{{param|FrictionJoint|joint|The new FrictionJoint.}}
 +
 +
== Function ==
 +
=== Synopsis ===
 +
<source lang="lua">
 +
joint = love.physics.newFrictionJoint( body1, body2, x1, y1, x2, y2, collideConnected )
 +
</source>
 +
=== Arguments ===
 +
{{param|Body|body1|The first body to attach to the joint.}}
 +
{{param|Body|body2|The second body to attach to the joint.}}
 +
{{param|number|x1|The x position of the first anchor point.}}
 +
{{param|number|y1|The y position of the first anchor point.}}
 +
{{param|number|x2|The x position of the second anchor point.}}
 +
{{param|number|y2|The y position of the second anchor point.}}
 
{{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with each other.}}
 
{{param|boolean|collideConnected (false)|Specifies whether the two bodies should collide with each other.}}
 
=== Returns ===
 
=== Returns ===
Line 19: Line 35:
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
 
* [[Constructs::FrictionJoint]]
 
* [[Constructs::FrictionJoint]]
 +
* [[Constructs::Joint]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=A FrictionJoint applies friction to a body.}}
+
{{#set:Description=A [[FrictionJoint]] applies friction to a body.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.physics.newFrictionJoint}}
 
{{i18n|love.physics.newFrictionJoint}}

Latest revision as of 18:00, 29 May 2013

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

Create a friction joint between two bodies. A FrictionJoint applies friction to a body.

Function

Synopsis

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

Arguments

Body body1
The first body to attach to the joint.
Body body2
The second body to attach to the joint.
number x
The x position of the anchor point.
number y
The y position of the anchor point.
boolean collideConnected (false)
Specifies whether the two bodies should collide with each other.

Returns

FrictionJoint joint
The new FrictionJoint.

Function

Synopsis

joint = love.physics.newFrictionJoint( body1, body2, x1, y1, x2, y2, collideConnected )

Arguments

Body body1
The first body to attach to the joint.
Body body2
The second body to attach to the joint.
number x1
The x position of the first anchor point.
number y1
The y position of the first anchor point.
number x2
The x position of the second anchor point.
number y2
The y position of the second anchor point.
boolean collideConnected (false)
Specifies whether the two bodies should collide with each other.

Returns

FrictionJoint joint
The new FrictionJoint.

See Also

Other Languages