Generic6DofJoint3D
A physics joint that allows for complex movement and rotation between two 3D physics bodies.
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.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
Generic6DofJoint3DConstructor
public Generic6DofJoint3D();Methods16
ClearAngularTargetRotationvoid
public void ClearAngularTargetRotation();Clears the quaternion angular target. After clearing, the joint is driven by Generic6DofJoint3D.Param.AngularSpringEquilibriumPoint on each axis as configured.
GetAngularTargetRotationQuaternion
public Quaternion GetAngularTargetRotation();Returns the joint's current angular target as a body-space quaternion. If no explicit target was set via Generic6DofJoint3D.SetAngularTargetRotation, the value is derived from Generic6DofJoint3D.Param.AngularSpringEquilibriumPoint on backends that support it; other backends return the identity quaternion.
QuaternionGetFlagXbool
public bool GetFlagX(Generic6DofJoint3D.Flag flag);| Name | Type | Default |
|---|---|---|
flag | Generic6DofJoint3D.Flag | — |
boolGetFlagYbool
public bool GetFlagY(Generic6DofJoint3D.Flag flag);| Name | Type | Default |
|---|---|---|
flag | Generic6DofJoint3D.Flag | — |
boolGetFlagZbool
public bool GetFlagZ(Generic6DofJoint3D.Flag flag);| Name | Type | Default |
|---|---|---|
flag | Generic6DofJoint3D.Flag | — |
boolGetParamXfloat
public float GetParamX(Generic6DofJoint3D.Param param);| Name | Type | Default |
|---|---|---|
param | Generic6DofJoint3D.Param | — |
floatGetParamYfloat
public float GetParamY(Generic6DofJoint3D.Param param);| Name | Type | Default |
|---|---|---|
param | Generic6DofJoint3D.Param | — |
floatGetParamZfloat
public float GetParamZ(Generic6DofJoint3D.Param param);| Name | Type | Default |
|---|---|---|
param | Generic6DofJoint3D.Param | — |
floatHasTargetRotationbool
public bool HasTargetRotation();Returns true if a quaternion angular target was explicitly set via Generic6DofJoint3D.SetAngularTargetRotation and has not been cleared. Returns false when the joint is driven by Generic6DofJoint3D.Param.AngularSpringEquilibriumPoint only.
boolSetAngularTargetRotationvoid
public void SetAngularTargetRotation(Quaternion targetRotation);Sets the target angular orientation as a body-space quaternion describing the desired orientation of body B relative to body A. Replaces any previously set target and supersedes Generic6DofJoint3D.Param.AngularSpringEquilibriumPoint until Generic6DofJoint3D.ClearAngularTargetRotation is called.
Note: Only for Jolt backend. Other 3D physics backends may ignore this value.
| Name | Type | Default |
|---|---|---|
targetRotation | Quaternion | — |
SetFlagXvoid
public void SetFlagX(Generic6DofJoint3D.Flag flag, bool value);| Name | Type | Default |
|---|---|---|
flag | Generic6DofJoint3D.Flag | — |
value | bool | — |
SetFlagYvoid
public void SetFlagY(Generic6DofJoint3D.Flag flag, bool value);| Name | Type | Default |
|---|---|---|
flag | Generic6DofJoint3D.Flag | — |
value | bool | — |
SetFlagZvoid
public void SetFlagZ(Generic6DofJoint3D.Flag flag, bool value);| Name | Type | Default |
|---|---|---|
flag | Generic6DofJoint3D.Flag | — |
value | bool | — |
SetParamXvoid
public void SetParamX(Generic6DofJoint3D.Param param, float value);| Name | Type | Default |
|---|---|---|
param | Generic6DofJoint3D.Param | — |
value | float | — |
SetParamYvoid
public void SetParamY(Generic6DofJoint3D.Param param, float value);| Name | Type | Default |
|---|---|---|
param | Generic6DofJoint3D.Param | — |
value | float | — |
SetParamZvoid
public void SetParamZ(Generic6DofJoint3D.Param param, float value);| Name | Type | Default |
|---|---|---|
param | Generic6DofJoint3D.Param | — |
value | float | — |
Generic6DofJoint3D.Flag
| Value | Description |
|---|---|
EnableAngularLimit = 1 | If enabled, rotational motion is possible within the given limits. |
EnableAngularMotor = 4 | If enabled, there is a rotational or angular motor across these axes. |
EnableAngularSpring = 2 | |
EnableLinearLimit = 0 | If enabled, linear motion is possible within the given limits. |
EnableLinearMotor = 5 | If enabled, there is a linear motor across these axes. |
EnableLinearSpring = 3 | |
EnableMotor = 4 | If enabled, there is a rotational or angular motor across these axes. |
Max = 6 | Represents the size of the |
Generic6DofJoint3D.Param
| Value | Description |
|---|---|
AngularDamping = 13 | The amount of rotational damping across the axes. The lower, the more damping occurs. |
AngularDriveTorqueLimit = 23 | The maximum torque the joint can apply around this angular axis.
Used by both the spring drive and the angular motor; supersedes |
AngularErp = 16 | When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. |
AngularForceLimit = 15 | The maximum amount of force that can occur, when rotating around the axes. |
AngularLimitSoftness = 12 | The speed of all rotations across the axes. |
AngularLowerLimit = 10 | The minimum rotation in negative direction to break loose and rotate around the axes. |
AngularMotorForceLimit = 18 | Maximum acceleration for the motor at the axes. |
AngularMotorTargetVelocity = 17 | Target speed for the motor at the axes. |
AngularRestitution = 14 | The amount of rotational restitution across the axes. The lower, the more restitution occurs. |
AngularSpringDamping = 20 | |
AngularSpringEquilibriumPoint = 21 | |
AngularSpringStiffness = 19 | |
AngularUpperLimit = 11 | The minimum rotation in positive direction to break loose and rotate around the axes. |
LinearDamping = 4 | The amount of damping that happens at the linear motion across the axes. |
LinearDriveForceLimit = 22 | The maximum force the joint can apply along this linear axis.
Used by both the spring drive and the linear motor; supersedes |
LinearLimitSoftness = 2 | A factor applied to the movement across the axes. The lower, the slower the movement. |
LinearLowerLimit = 0 | The minimum difference between the pivot points' axes. |
LinearMotorForceLimit = 6 | The maximum force the linear motor will apply while trying to reach the velocity target. |
LinearMotorTargetVelocity = 5 | The velocity the linear motor will try to reach. |
LinearRestitution = 3 | The amount of restitution on the axes' movement. The lower, the more momentum gets lost. |
LinearSpringDamping = 8 | |
LinearSpringEquilibriumPoint = 9 | |
LinearSpringStiffness = 7 | |
LinearUpperLimit = 1 | The maximum difference between the pivot points' axes. |
Max = 24 | Represents the size of the |