Inherits: Joint < Spatial < Node < Object
A hinge between two 3D bodies.
A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though.
float | angular_limit/bias | 0.3 |
bool | angular_limit/enable | false |
float | angular_limit/lower | -90.0 |
float | angular_limit/relaxation | 1.0 |
float | angular_limit/softness | 0.9 |
float | angular_limit/upper | 90.0 |
bool | motor/enable | false |
float | motor/max_impulse | 1.0 |
float | motor/target_velocity | 1.0 |
float | params/bias | 0.3 |
bool | get_flag ( Flag flag ) const |
float | get_param ( Param param ) const |
void | set_flag ( Flag flag, bool enabled ) |
void | set_param ( Param param, float value ) |
enum Param:
true
.true
.enum Flag:
true
, the hinges maximum and minimum rotation, defined by angular_limit/lower and angular_limit/upper has effects.Default | 0.3 |
Setter | set_param(value) |
Getter | get_param() |
The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
Default | false |
Setter | set_flag(value) |
Getter | get_flag() |
If true
, the hinges maximum and minimum rotation, defined by angular_limit/lower and angular_limit/upper has effects.
Default | -90.0 |
The minimum rotation. Only active if angular_limit/enable is true
.
Default | 1.0 |
Setter | set_param(value) |
Getter | get_param() |
The lower this value, the more the rotation gets slowed down.
Default | 0.9 |
Setter | set_param(value) |
Getter | get_param() |
Default | 90.0 |
The maximum rotation. Only active if angular_limit/enable is true
.
Default | false |
Setter | set_flag(value) |
Getter | get_flag() |
When activated, a motor turns the hinge.
Default | 1.0 |
Setter | set_param(value) |
Getter | get_param() |
Maximum acceleration for the motor.
Default | 1.0 |
Setter | set_param(value) |
Getter | get_param() |
Target speed for the motor.
Default | 0.3 |
Setter | set_param(value) |
Getter | get_param() |
The speed with which the two bodies get pulled together when they move in different directions.
Returns the value of the specified flag.
Returns the value of the specified parameter.
If true
, enables the specified flag.
Sets the value of the specified parameter.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_hingejoint.html