Joint2D

Inherits: Node2D < CanvasItem < Node < Object

Inherited By: PinJoint2D, DampedSpringJoint2D, GrooveJoint2D

Category: Core

Brief Description

Base node for all joint constraints in 2D physics.

Member Functions

float

get_bias ( ) const

bool

get_exclude_nodes_from_collision ( ) const

NodePath

get_node_a ( ) const

NodePath

get_node_b ( ) const

void

set_bias ( float bias )

void

set_exclude_nodes_from_collision ( bool enable )

void

set_node_a ( NodePath node )

void

set_node_b ( NodePath node )

Description

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

Member Function Description

  • float get_bias ( ) const

  • bool get_exclude_nodes_from_collision ( ) const

Return the path to the A node for the joint.

Return the path to the B node for the joint.

  • void set_bias ( float bias )

  • void set_exclude_nodes_from_collision ( bool enable )

Set the path to the A node for the joint. Must be of type PhysicsBody2D.

Set the path to the B node for the joint. Must be of type PhysicsBody2D.