Inheritance #

Generic6DOFJoint3D
Table of contents

Generic6DOFJoint3D #

is_instantiable, Node3D, Node, core, not_builtin_classes

A physics joint that allows for complex movement and rotation between two 3D physics bodies.

The Generic6DOFJoint3D (6 Degrees Of Freedom) joint allows for implementing custom types of joints by locking the rotation and translation of certain axes.

The first 3 DOF represent the linear motion of the physics bodies and the last 3 DOF represent the angular motion of the physics bodies. Each axis can be either locked, or limited.

Members #

var angular_limit_x/damping: float = 1.0#

The amount of rotational damping across the X axis.

The lower, the longer an impulse from one side takes to travel to the other side.

var angular_limit_x/enabled: bool = true#

If true, rotation across the X axis is limited.

var angular_limit_x/erp: float = 0.5#

When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.

var angular_limit_x/force_limit: float = 0.0#

The maximum amount of force that can occur, when rotating around the X axis.

var angular_limit_x/lower_angle: float = 0.0#

The minimum rotation in negative direction to break loose and rotate around the X axis.

var angular_limit_x/restitution: float = 0.0#

The amount of rotational restitution across the X axis. The lower, the more restitution occurs.

var angular_limit_x/softness: float = 0.5#

The speed of all rotations across the X axis.

var angular_limit_x/upper_angle: float = 0.0#

The minimum rotation in positive direction to break loose and rotate around the X axis.

var angular_limit_y/damping: float = 1.0#

The amount of rotational damping across the Y axis. The lower, the more damping occurs.

var angular_limit_y/enabled: bool = true#

If true, rotation across the Y axis is limited.

var angular_limit_y/erp: float = 0.5#

When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.

var angular_limit_y/force_limit: float = 0.0#

The maximum amount of force that can occur, when rotating around the Y axis.

var angular_limit_y/lower_angle: float = 0.0#

The minimum rotation in negative direction to break loose and rotate around the Y axis.

var angular_limit_y/restitution: float = 0.0#

The amount of rotational restitution across the Y axis. The lower, the more restitution occurs.

var angular_limit_y/softness: float = 0.5#

The speed of all rotations across the Y axis.

var angular_limit_y/upper_angle: float = 0.0#

The minimum rotation in positive direction to break loose and rotate around the Y axis.

var angular_limit_z/damping: float = 1.0#

The amount of rotational damping across the Z axis. The lower, the more damping occurs.

var angular_limit_z/enabled: bool = true#

If true, rotation across the Z axis is limited.

var angular_limit_z/erp: float = 0.5#

When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.

var angular_limit_z/force_limit: float = 0.0#

The maximum amount of force that can occur, when rotating around the Z axis.

var angular_limit_z/lower_angle: float = 0.0#

The minimum rotation in negative direction to break loose and rotate around the Z axis.

var angular_limit_z/restitution: float = 0.0#

The amount of rotational restitution across the Z axis. The lower, the more restitution occurs.

var angular_limit_z/softness: float = 0.5#

The speed of all rotations across the Z axis.

var angular_limit_z/upper_angle: float = 0.0#

The minimum rotation in positive direction to break loose and rotate around the Z axis.

var angular_motor_x/enabled: bool = false#

If true, a rotating motor at the X axis is enabled.

var angular_motor_x/force_limit: float = 300.0#

Maximum acceleration for the motor at the X axis.

var angular_motor_x/target_velocity: float = 0.0#

Target speed for the motor at the X axis.

var angular_motor_y/enabled: bool = false#

If true, a rotating motor at the Y axis is enabled.

var angular_motor_y/force_limit: float = 300.0#

Maximum acceleration for the motor at the Y axis.

var angular_motor_y/target_velocity: float = 0.0#

Target speed for the motor at the Y axis.

var angular_motor_z/enabled: bool = false#

If true, a rotating motor at the Z axis is enabled.

var angular_motor_z/force_limit: float = 300.0#

Maximum acceleration for the motor at the Z axis.

var angular_motor_z/target_velocity: float = 0.0#

Target speed for the motor at the Z axis.

var angular_spring_x/damping: float = 0.0#

var angular_spring_x/enabled: bool = false#

var angular_spring_x/equilibrium_point: float = 0.0#

var angular_spring_x/stiffness: float = 0.0#

var angular_spring_y/damping: float = 0.0#

var angular_spring_y/enabled: bool = false#

var angular_spring_y/equilibrium_point: float = 0.0#

var angular_spring_y/stiffness: float = 0.0#

var angular_spring_z/damping: float = 0.0#

var angular_spring_z/enabled: bool = false#

var angular_spring_z/equilibrium_point: float = 0.0#

var angular_spring_z/stiffness: float = 0.0#

var linear_limit_x/damping: float = 1.0#

The amount of damping that happens at the X motion.

var linear_limit_x/enabled: bool = true#

If true, the linear motion across the X axis is limited.

var linear_limit_x/lower_distance: float = 0.0#

The minimum difference between the pivot points' X axis.

var linear_limit_x/restitution: float = 0.5#

The amount of restitution on the X axis movement. The lower, the more momentum gets lost.

var linear_limit_x/softness: float = 0.7#

A factor applied to the movement across the X axis. The lower, the slower the movement.

var linear_limit_x/upper_distance: float = 0.0#

The maximum difference between the pivot points' X axis.

var linear_limit_y/damping: float = 1.0#

The amount of damping that happens at the Y motion.

var linear_limit_y/enabled: bool = true#

If true, the linear motion across the Y axis is limited.

var linear_limit_y/lower_distance: float = 0.0#

The minimum difference between the pivot points' Y axis.

var linear_limit_y/restitution: float = 0.5#

The amount of restitution on the Y axis movement. The lower, the more momentum gets lost.

var linear_limit_y/softness: float = 0.7#

A factor applied to the movement across the Y axis. The lower, the slower the movement.

var linear_limit_y/upper_distance: float = 0.0#

The maximum difference between the pivot points' Y axis.

var linear_limit_z/damping: float = 1.0#

The amount of damping that happens at the Z motion.

var linear_limit_z/enabled: bool = true#

If true, the linear motion across the Z axis is limited.

var linear_limit_z/lower_distance: float = 0.0#

The minimum difference between the pivot points' Z axis.

var linear_limit_z/restitution: float = 0.5#

The amount of restitution on the Z axis movement. The lower, the more momentum gets lost.

var linear_limit_z/softness: float = 0.7#

A factor applied to the movement across the Z axis. The lower, the slower the movement.

var linear_limit_z/upper_distance: float = 0.0#

The maximum difference between the pivot points' Z axis.

var linear_motor_x/enabled: bool = false#

If true, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits.

var linear_motor_x/force_limit: float = 0.0#

The maximum force the linear motor can apply on the X axis while trying to reach the target velocity.

var linear_motor_x/target_velocity: float = 0.0#

The speed that the linear motor will attempt to reach on the X axis.

var linear_motor_y/enabled: bool = false#

If true, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits.

var linear_motor_y/force_limit: float = 0.0#

The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity.

var linear_motor_y/target_velocity: float = 0.0#

The speed that the linear motor will attempt to reach on the Y axis.

var linear_motor_z/enabled: bool = false#

If true, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits.

var linear_motor_z/force_limit: float = 0.0#

The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity.

var linear_motor_z/target_velocity: float = 0.0#

The speed that the linear motor will attempt to reach on the Z axis.

var linear_spring_x/damping: float = 0.01#

var linear_spring_x/enabled: bool = false#

var linear_spring_x/equilibrium_point: float = 0.0#

var linear_spring_x/stiffness: float = 0.01#

var linear_spring_y/damping: float = 0.01#

var linear_spring_y/enabled: bool = false#

var linear_spring_y/equilibrium_point: float = 0.0#

var linear_spring_y/stiffness: float = 0.01#

var linear_spring_z/damping: float = 0.01#

var linear_spring_z/enabled: bool = false#

var linear_spring_z/equilibrium_point: float = 0.0#

var linear_spring_z/stiffness: float = 0.01#

Methods #

const func get_flag_x(flag: int enumGeneric6DOFJoint3D.Flag) -> bool#

const func get_flag_y(flag: int enumGeneric6DOFJoint3D.Flag) -> bool#

const func get_flag_z(flag: int enumGeneric6DOFJoint3D.Flag) -> bool#

const func get_param_x(param: int enumGeneric6DOFJoint3D.Param) -> float#

const func get_param_y(param: int enumGeneric6DOFJoint3D.Param) -> float#

const func get_param_z(param: int enumGeneric6DOFJoint3D.Param) -> float#

func set_flag_x(value: bool) -> void#

func set_flag_y(value: bool) -> void#

func set_flag_z(value: bool) -> void#

func set_param_x(value: float) -> void#

func set_param_y(value: float) -> void#

func set_param_z(value: float) -> void#

Annotations #

Constants #

const PARAM_LINEAR_LOWER_LIMIT = 0 enum Param#

The minimum difference between the pivot points' axes.

const PARAM_LINEAR_UPPER_LIMIT = 1 enum Param#

The maximum difference between the pivot points' axes.

const PARAM_LINEAR_LIMIT_SOFTNESS = 2 enum Param#

A factor applied to the movement across the axes. The lower, the slower the movement.

const PARAM_LINEAR_RESTITUTION = 3 enum Param#

The amount of restitution on the axes' movement. The lower, the more momentum gets lost.

const PARAM_LINEAR_DAMPING = 4 enum Param#

The amount of damping that happens at the linear motion across the axes.

const PARAM_LINEAR_MOTOR_TARGET_VELOCITY = 5 enum Param#

The velocity the linear motor will try to reach.

const PARAM_LINEAR_MOTOR_FORCE_LIMIT = 6 enum Param#

The maximum force the linear motor will apply while trying to reach the velocity target.

const PARAM_LINEAR_SPRING_STIFFNESS = 7 enum Param#

const PARAM_LINEAR_SPRING_DAMPING = 8 enum Param#

const PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT = 9 enum Param#

const PARAM_ANGULAR_LOWER_LIMIT = 10 enum Param#

The minimum rotation in negative direction to break loose and rotate around the axes.

const PARAM_ANGULAR_UPPER_LIMIT = 11 enum Param#

The minimum rotation in positive direction to break loose and rotate around the axes.

const PARAM_ANGULAR_LIMIT_SOFTNESS = 12 enum Param#

The speed of all rotations across the axes.

const PARAM_ANGULAR_DAMPING = 13 enum Param#

The amount of rotational damping across the axes. The lower, the more damping occurs.

const PARAM_ANGULAR_RESTITUTION = 14 enum Param#

The amount of rotational restitution across the axes. The lower, the more restitution occurs.

const PARAM_ANGULAR_FORCE_LIMIT = 15 enum Param#

The maximum amount of force that can occur, when rotating around the axes.

const PARAM_ANGULAR_ERP = 16 enum Param#

When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.

const PARAM_ANGULAR_MOTOR_TARGET_VELOCITY = 17 enum Param#

Target speed for the motor at the axes.

const PARAM_ANGULAR_MOTOR_FORCE_LIMIT = 18 enum Param#

Maximum acceleration for the motor at the axes.

const PARAM_ANGULAR_SPRING_STIFFNESS = 19 enum Param#

const PARAM_ANGULAR_SPRING_DAMPING = 20 enum Param#

const PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT = 21 enum Param#

const PARAM_MAX = 22 enum Param#

Represents the size of the Param enum.

const FLAG_ENABLE_LINEAR_LIMIT = 0 enum Flag#

If enabled, linear motion is possible within the given limits.

const FLAG_ENABLE_ANGULAR_LIMIT = 1 enum Flag#

If enabled, rotational motion is possible within the given limits.

const FLAG_ENABLE_LINEAR_SPRING = 3 enum Flag#

const FLAG_ENABLE_ANGULAR_SPRING = 2 enum Flag#

const FLAG_ENABLE_MOTOR = 4 enum Flag#

If enabled, there is a rotational motor across these axes.

const FLAG_ENABLE_LINEAR_MOTOR = 5 enum Flag#

If enabled, there is a linear motor across these axes.

const FLAG_MAX = 6 enum Flag#

Represents the size of the Flag enum.

Constructors #

Enums #

Param#

enum Param { PARAM_LINEAR_LOWER_LIMIT = 0, PARAM_LINEAR_UPPER_LIMIT = 1, PARAM_LINEAR_LIMIT_SOFTNESS = 2, PARAM_LINEAR_RESTITUTION = 3, PARAM_LINEAR_DAMPING = 4, PARAM_LINEAR_MOTOR_TARGET_VELOCITY = 5, PARAM_LINEAR_MOTOR_FORCE_LIMIT = 6, PARAM_LINEAR_SPRING_STIFFNESS = 7, PARAM_LINEAR_SPRING_DAMPING = 8, PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT = 9, PARAM_ANGULAR_LOWER_LIMIT = 10, PARAM_ANGULAR_UPPER_LIMIT = 11, PARAM_ANGULAR_LIMIT_SOFTNESS = 12, PARAM_ANGULAR_DAMPING = 13, PARAM_ANGULAR_RESTITUTION = 14, PARAM_ANGULAR_FORCE_LIMIT = 15, PARAM_ANGULAR_ERP = 16, PARAM_ANGULAR_MOTOR_TARGET_VELOCITY = 17, PARAM_ANGULAR_MOTOR_FORCE_LIMIT = 18, PARAM_ANGULAR_SPRING_STIFFNESS = 19, PARAM_ANGULAR_SPRING_DAMPING = 20, PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT = 21, PARAM_MAX = 22, }

Flag#

enum Flag { FLAG_ENABLE_LINEAR_LIMIT = 0, FLAG_ENABLE_ANGULAR_LIMIT = 1, FLAG_ENABLE_LINEAR_SPRING = 3, FLAG_ENABLE_ANGULAR_SPRING = 2, FLAG_ENABLE_MOTOR = 4, FLAG_ENABLE_LINEAR_MOTOR = 5, FLAG_MAX = 6, }

Operators #

Signals #

Theme Items #

Tutorials #