Struct Joint2D
Base node for all joint constraints in 2D physics.
struct Joint2D
;
Joints take 2 bodies and apply a custom constraint.
Properties
Name | Type | Description |
---|---|---|
bias [get, set]
|
double | When nodeA and nodeB move in different directions the bias controls how fast the joint pulls them back to their original position. The lower the bias the more the two bodies can pull on the joint.
|
disableCollision [get, set]
|
bool | If true , nodeA and nodeB can collide.
|
nodeA [get, set]
|
NodePath | The first body attached to the joint. Must derive from PhysicsBody2D .
|
nodeB [get, set]
|
NodePath | The second body attached to the joint. Must derive from PhysicsBody2D .
|
Methods
Name | Description |
---|---|
getBias
|
|
getExcludeNodesFromCollision
|
|
getNodeA
|
|
getNodeB
|
|
setBias
|
|
setExcludeNodesFromCollision
|
|
setNodeA
|
|
setNodeB
|