Joint2D

Inherits: Node2D < CanvasItem < Node < Object

Inherited By: DampedSpringJoint2D, GrooveJoint2D, PinJoint2D

Category: Core

Brief Description

Base node for all joint constraints in 2D physics.

Properties

floatbias
booldisable_collision
NodePathnode_a
NodePathnode_b

Description

Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.

Property Descriptions

Setterset_bias(value)
Getterget_bias()

When node_a and node_b 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. Default value: 0


  • bool disable_collision
Setterset_exclude_nodes_from_collision(value)
Getterget_exclude_nodes_from_collision()

If true, node_a and node_b can collide. Default value: false.


Setterset_node_a(value)
Getterget_node_a()

The first body attached to the joint. Must derive from PhysicsBody2D.


Setterset_node_b(value)
Getterget_node_b()

The second body attached to the joint. Must derive from PhysicsBody2D.