Class D6Joint
Physics joint that is the most customizable type of joint. This joint type can be used to create all other built-in joint types, and to design your own custom ones, but is less intuitive to use. Allows a specification of a linear constraint (for example for a slider), twist constraint (rotating around X) and swing constraint (rotating around Y and Z). It also allows you to constrain limits to only specific axes or completely lock specific axes.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorContextMenu("New/Physics/Joints/D6 Joint")]
[ActorToolbox("Physics")]
[Unmanaged]
public class D6Joint : Joint, ISerializable
Constructors
D6Joint()
Properties
CurrentSwingY
Gets the current swing angle of the joint from the Y axis.
Declaration
[Unmanaged]
public float CurrentSwingY { get; }
Property Value
System.Single
|
CurrentSwingZ
Gets the current swing angle of the joint from the Z axis.
Declaration
[Unmanaged]
public float CurrentSwingZ { get; }
Property Value
System.Single
|
CurrentTwist
Gets the twist angle of the joint (in the range (-2Pi, 2Pi]).
Declaration
[Unmanaged]
public float CurrentTwist { get; }
Property Value
System.Single
|
LimitLinear
Determines the linear limit used for constraining translation degrees of freedom.
Declaration
[EditorOrder(200)]
[EditorDisplay("Joint", null)]
[Unmanaged]
public LimitLinear LimitLinear { get; set; }
Property Value
LimitLinear
|
LimitSwing
Determines the cone limit used for constraining the swing (rotation around Y and Z) degree of freedom.
Declaration
[EditorOrder(220)]
[EditorDisplay("Joint", null)]
[Unmanaged]
public LimitConeRange LimitSwing { get; set; }
Property Value
LimitConeRange
|
LimitTwist
Determines the angular limit used for constraining the twist (rotation around X) degree of freedom.
Declaration
[EditorOrder(210)]
[EditorDisplay("Joint", null)]
[Unmanaged]
public LimitAngularRange LimitTwist { get; set; }
Property Value
LimitAngularRange
|
Methods
GetDrive(D6JointDriveType)
Gets the drive parameters for the specified drive type.
Declaration
[Unmanaged]
public D6JointDrive GetDrive(D6JointDriveType index)
Parameters
D6JointDriveType
index
The type of drive being specified. |
Returns
D6JointDrive
The value. |
GetMotion(D6JointAxis)
Gets the motion type around the specified axis.
Declaration
[Unmanaged]
public D6JointMotion GetMotion(D6JointAxis axis)
Parameters
D6JointAxis
axis
The axis the degree of freedom around which the motion type is specified. |
Returns
D6JointMotion
The value. |
Remarks
Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.
SetDrive(D6JointDriveType, D6JointDrive)
Sets the drive parameters for the specified drive type.
Declaration
[Unmanaged]
public void SetDrive(D6JointDriveType index, D6JointDrive value)
Parameters
D6JointDriveType
index
The type of drive being specified. |
D6JointDrive
value
The value. |
SetMotion(D6JointAxis, D6JointMotion)
Sets the motion type around the specified axis.
Declaration
[Unmanaged]
public void SetMotion(D6JointAxis axis, D6JointMotion value)
Parameters
D6JointAxis
axis
The axis the degree of freedom around which the motion type is specified. |
D6JointMotion
value
The value. |
Remarks
Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.