Base node for all joint constraints in 2D physics.
    public abstract class Joint2D : Node2D

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

Inheritance Chain

Derived Classes

Properties

    public float Bias { get; set; }

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. Default value: 0

    public bool DisableCollision { get; set; }

If true, NodeA and NodeB can collide. Default value: false.

    public NodePath NodeA { get; set; }

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

    public NodePath NodeB { get; set; }

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

Methods

    public float GetBias()

Getter for Bias

    public bool GetExcludeNodesFromCollision()

Getter for DisableCollision

    public NodePath GetNodeA()

Getter for NodeA

    public NodePath GetNodeB()

Getter for NodeB

    public void SetBias(float bias)

Setter for Bias

    public void SetExcludeNodesFromCollision(bool enable)

Setter for DisableCollision

    public void SetNodeA(NodePath node)

Setter for NodeA

    public void SetNodeB(NodePath node)

Setter for NodeB

Tags: