Class BaseJoint
Inheritance
Namespace: Motphys.Rigidbody
Assembly: solution.dll
Syntax
public abstract class BaseJoint : NativeObject
Fields
_autoConfigureConnected
Declaration
protected bool _autoConfigureConnected
Field Value
Type | Description |
---|---|
System.Boolean | Whether configure connected body's anchor frame automatically. |
_connectBody
Declaration
protected Rigidbody3D _connectBody
Field Value
Type | Description |
---|---|
Rigidbody3D | The connected body. |
_inertiaScaleA
Declaration
protected float _inertiaScaleA
Field Value
Type | Description |
---|---|
System.Single | Inertia scale for body A. |
_inertiaScaleB
Declaration
protected float _inertiaScaleB
Field Value
Type | Description |
---|---|
System.Single | Inertia scale for body B. |
_numPosSolverIter
Declaration
protected uint _numPosSolverIter
Field Value
Type | Description |
---|---|
System.UInt32 | Custom joint positional solver iterations. |
Properties
anchorFrame
Declaration
public AxisFrame anchorFrame { get; set; }
Property Value
Type | Description |
---|---|
AxisFrame | The anchor frame defined in body A's local space. |
anchorPosition
Declaration
public Vector3 anchorPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The body A's anchor position in gameObject's local space. |
autoConfigureConnected
Declaration
public bool autoConfigureConnected { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether configure connected body's anchor frame automatically. |
body
Declaration
public Rigidbody3D body { get; }
Property Value
Type | Description |
---|---|
Rigidbody3D | The rigidbody that this joint is attached to |
breakForce
Declaration
public float breakForce { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The force required to break joint. |
breakTorque
Declaration
public float breakTorque { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The torque required to break joint. |
connectedAnchorFrame
Declaration
public AxisFrame connectedAnchorFrame { get; set; }
Property Value
Type | Description |
---|---|
AxisFrame | The connected body's anchor frame in connected object's local space. Note: If autoConfigureConnected is true, the set value will be ignored. |
connectedAnchorPosition
Declaration
public Vector3 connectedAnchorPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The connected body's anchor in connected object's local space. Note: if autoConfigureConnected is true, the set value will be ignored. |
connectedBody
Declaration
public Rigidbody3D connectedBody { get; set; }
Property Value
Type | Description |
---|---|
Rigidbody3D | The rigidbody that this joint is connected to |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when trying to set the connected body to the same object that the joint is attached to. |
ignoreCollision
Declaration
public bool ignoreCollision { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If true, the collision of the two connected rigidbody will be ignored. |
inertiaScaleA
Declaration
public float inertiaScaleA { get; set; }
Property Value
Type | Description |
---|---|
System.Single | Inertia scale for body A, inertia scale should be positive. |
inertiaScaleB
Declaration
public float inertiaScaleB { get; set; }
Property Value
Type | Description |
---|---|
System.Single | Inertia scale for body B, inertia scale should be positive. |
numPosSolverIter
Declaration
public uint numPosSolverIter { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 | Custom joint positional solver iterations, range from 1 to 20. This is a lower bounds setting. The engine will choose the max value between this and the global positional solver iterations for each island. |
worldAnchorPosition
Declaration
public Vector3 worldAnchorPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 | The body A's anchor position in world space. |
worldAnchorRotation
Declaration
public Quaternion worldAnchorRotation { get; }
Property Value
Type | Description |
---|---|
Quaternion | The body A's anchor rotation in world space. |
worldConnectedAnchorPosition
Declaration
public Vector3 worldConnectedAnchorPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 | The connected body's anchor position in world space |
worldConnectedAnchorRotation
Declaration
public Quaternion worldConnectedAnchorRotation { get; }
Property Value
Type | Description |
---|---|
Quaternion | The connected body's anchor rotation in world space |
Methods
ApplyProperties()
Declaration
protected void ApplyProperties()
Awake()
Declaration
protected override void Awake()
Overrides
OnCreateNative()
Declaration
protected override void OnCreateNative()
Overrides
OnDestroyNative()
Declaration
protected override void OnDestroyNative()
Overrides
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |