HingeJoint3D
A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body.
A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body.
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.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
HingeJoint3DConstructor
public HingeJoint3D();Methods4
GetFlagbool
public bool GetFlag(HingeJoint3D.Flag flag);Returns the value of the specified flag.
| Name | Type | Default |
|---|---|---|
flag | HingeJoint3D.Flag | — |
boolGetParamfloat
public float GetParam(HingeJoint3D.Param param);Returns the value of the specified parameter.
| Name | Type | Default |
|---|---|---|
param | HingeJoint3D.Param | — |
floatSetFlagvoid
public void SetFlag(HingeJoint3D.Flag flag, bool enabled);If true, enables the specified flag.
| Name | Type | Default |
|---|---|---|
flag | HingeJoint3D.Flag | — |
enabled | bool | — |
SetParamvoid
public void SetParam(HingeJoint3D.Param param, float value);Sets the value of the specified parameter.
| Name | Type | Default |
|---|---|---|
param | HingeJoint3D.Param | — |
value | float | — |
HingeJoint3D.Flag
| Value | Description |
|---|---|
EnableMotor = 1 | When activated, a motor turns the hinge. |
Max = 2 | Represents the size of the |
UseLimit = 0 | If |
HingeJoint3D.Param
| Value | Description |
|---|---|
Bias = 0 | The speed with which the two bodies get pulled together when they move in different directions. |
LimitBias = 3 | The speed with which the rotation across the axis perpendicular to the hinge gets corrected. |
LimitLower = 2 | The minimum rotation. Only active if |
LimitRelaxation = 5 | The lower this value, the more the rotation gets slowed down. |
LimitSoftness = 4 | |
LimitUpper = 1 | The maximum rotation. Only active if |
Max = 8 | Represents the size of the |
MotorMaxImpulse = 7 | Maximum acceleration for the motor. |
MotorTargetVelocity = 6 | Target speed for the motor. |