Class HingeJoint3D
A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body.
- Inheritance
-
HingeJoint3D
Remarks
A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. For example, Body A can be a StaticBody3D representing a door hinge that a RigidBody3D rotates around.
Properties
angular_limit/bias
The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
var angular_limit/bias : float = 0.3
Property Value
Remarks
angular_limit/enable
If true
, the hinges maximum and minimum rotation, defined by angular_limit/lower and angular_limit/upper has effects.
var angular_limit/enable : bool = false
Property Value
Remarks
angular_limit/lower
The minimum rotation. Only active if angular_limit/enable is true
.
var angular_limit/lower : float = -1.5708
Property Value
Remarks
angular_limit/relaxation
The lower this value, the more the rotation gets slowed down.
var angular_limit/relaxation : float = 1.0
Property Value
Remarks
angular_limit/softness
var angular_limit/softness : float = 0.9
Property Value
Remarks
angular_limit/upper
The maximum rotation. Only active if angular_limit/enable is true
.
var angular_limit/upper : float = 1.5708
Property Value
Remarks
motor/enable
When activated, a motor turns the hinge.
var motor/enable : bool = false
Property Value
Remarks
motor/max_impulse
Maximum acceleration for the motor.
var motor/max_impulse : float = 1.0
Property Value
Remarks
motor/target_velocity
Target speed for the motor.
var motor/target_velocity : float = 1.0
Property Value
Remarks
params/bias
The speed with which the two bodies get pulled together when they move in different directions.
var params/bias : float = 0.3
Property Value
Remarks
Methods
get_flag(int)
Qualifiers: const
Returns the value of the specified flag.
bool get_flag(int flag)
Parameters
flag
int
get_param(int)
Qualifiers: const
Returns the value of the specified parameter.
float get_param(int param)
Parameters
param
int
set_flag(int, bool)
If true
, enables the specified flag.
void set_flag(int flag, bool enabled)
Parameters
set_param(int, float)
Sets the value of the specified parameter.
void set_param(int param, float value)