Joint2D

Inherits: Node2D < CanvasItem < Node < Object

Inherited By: DampedSpringJoint2D, GrooveJoint2D, PinJoint2D

Base node for all joint constraints in 2D physics.

Description

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

Properties

floatbias0.0
booldisable_collisiontrue
NodePathnode_aNodePath("")
NodePathnode_bNodePath("")

Property Descriptions

Default0.0
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.


  • bool disable_collision
Defaulttrue
Setterset_exclude_nodes_from_collision(value)
Getterget_exclude_nodes_from_collision()

If true, node_a and node_b can collide.


DefaultNodePath("")
Setterset_node_a(value)
Getterget_node_a()

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


DefaultNodePath("")
Setterset_node_b(value)
Getterget_node_b()

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

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.