Struct Joint2D

Base node for all joint constraints in 2D physics.

struct Joint2D ;

Joints take 2 bodies and apply a custom constraint.

Properties

NameTypeDescription
bias[get, set] doubleWhen 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] boolIf true, nodeA and nodeB can collide.
nodeA[get, set] NodePathThe first body attached to the joint. Must derive from PhysicsBody2D.
nodeB[get, set] NodePathThe second body attached to the joint. Must derive from PhysicsBody2D.

Methods

NameDescription
getBias
getExcludeNodesFromCollision
getNodeA
getNodeB
setBias
setExcludeNodesFromCollision
setNodeA
setNodeB