Inheritance #

ConeTwistJoint3D
Table of contents

ConeTwistJoint3D #

is_instantiable, Node3D, Node, core, not_builtin_classes

A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint.

A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the ConeTwistJoint3D. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc.

Members #

var bias: float = 0.3#

The speed with which the swing or twist will take place.

The higher, the faster.

var relaxation: float = 1.0#

Defines, how fast the swing- and twist-speed-difference on both sides gets synced.

var softness: float = 0.8#

The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.

var swing_span: float = 0.785398#

Swing is rotation from side to side, around the axis perpendicular to the twist axis.

The swing span defines, how much rotation will not get corrected along the swing axis.

Could be defined as looseness in the ConeTwistJoint3D.

If below 0.05, this behavior is locked.

var twist_span: float = 3.14159#

Twist is the rotation around the twist axis, this value defined how far the joint can twist.

Twist is locked if below 0.05.

Methods #

const func get_param(param: int enumConeTwistJoint3D.Param) -> float#

Returns the value of the specified parameter.

func set_param(value: float) -> void#

Sets the value of the specified parameter.

Annotations #

Constants #

const PARAM_SWING_SPAN = 0 enum Param#

Swing is rotation from side to side, around the axis perpendicular to the twist axis.

The swing span defines, how much rotation will not get corrected along the swing axis.

Could be defined as looseness in the ConeTwistJoint3D.

If below 0.05, this behavior is locked.

const PARAM_TWIST_SPAN = 1 enum Param#

Twist is the rotation around the twist axis, this value defined how far the joint can twist.

Twist is locked if below 0.05.

const PARAM_BIAS = 2 enum Param#

The speed with which the swing or twist will take place.

The higher, the faster.

const PARAM_SOFTNESS = 3 enum Param#

The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.

const PARAM_RELAXATION = 4 enum Param#

Defines, how fast the swing- and twist-speed-difference on both sides gets synced.

const PARAM_MAX = 5 enum Param#

Represents the size of the Param enum.

Constructors #

Enums #

Param#

enum Param { PARAM_SWING_SPAN = 0, PARAM_TWIST_SPAN = 1, PARAM_BIAS = 2, PARAM_SOFTNESS = 3, PARAM_RELAXATION = 4, PARAM_MAX = 5, }

Operators #

Signals #

Theme Items #

Tutorials #