Difference between revisions of "love.physics.newWeldJoint"

(Adding Constructs::Joint for consistency with Shapes.)
m
Line 1: Line 1:
 
{{newin|[[0.8.0]]|080|type=function}}
 
{{newin|[[0.8.0]]|080|type=function}}
Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver.
+
Creates a constraint joint between two bodies. A [[WeldJoint]] essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver.
  
 
== Function ==
 
== Function ==
Line 37: Line 37:
 
* [[Constructs::Joint]]
 
* [[Constructs::Joint]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=A WeldJoint essentially glues two bodies together.}}
+
{{#set:Description=A [[WeldJoint]] essentially glues two bodies together.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.physics.newWeldJoint}}
 
{{i18n|love.physics.newWeldJoint}}

Revision as of 18:02, 29 May 2013

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

Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver.

Function

Synopsis

joint = love.physics.newWeldJoint( 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 (world space).
number y
The y position of the anchor point (world space).
boolean collideConnected (false)
Specifies whether the two bodies should collide with each other.

Returns

WeldJoint joint
The new WeldJoint.

Function

Synopsis

joint = love.physics.newWeldJoint( 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. (local space body 1)
number y1
The y position of the first anchor point. (local space body 1)
number x2
The x position of the second anchor point. (local space body 2)
number y2
The y position of the second anchor point. (local space body 2)
boolean collideConnected (false)
Specifies whether the two bodies should collide with each other.

Returns

WeldJoint joint
The new WeldJoint.

See Also

Other Languages