Class GravitasConstraint3DService
- Namespace
- Gravitas
- Assembly
- Gravitas.dll
Owns deterministic 3D joints and ragdoll articulation state for one world context.
public sealed class GravitasConstraint3DService
- Inheritance
-
GravitasConstraint3DService
- Inherited Members
Properties
Context
Gets the owning world context.
public GravitasWorldContext Context { get; }
Property Value
PeakJointCount
Gets the highest joint ID allocated in this context.
public int PeakJointCount { get; }
Property Value
RegisteredJointCount
Gets the number of registered active joints.
public int RegisteredJointCount { get; }
Property Value
RegisteredRagdollCount
Gets the number of registered ragdoll runtimes.
public int RegisteredRagdollCount { get; }
Property Value
Methods
ClearJointMotorTarget(int)
Disables a joint motor target and clears its cached solver impulses.
public bool ClearJointMotorTarget(int jointId)
Parameters
jointIdint
Returns
GetJoint(int)
Gets a registered joint by context-local ID.
public Joint3D GetJoint(int jointId)
Parameters
jointIdint
Returns
RegisterJoint(in JointDefinition3D)
Registers a context-owned deterministic 3D joint.
public Joint3D RegisterJoint(in JointDefinition3D definition)
Parameters
definitionJointDefinition3D
Returns
RegisterRagdoll(RagdollDefinition3D)
Registers a ragdoll articulation and its owned joints.
public RagdollRuntime3D RegisterRagdoll(RagdollDefinition3D definition)
Parameters
definitionRagdollDefinition3D
Returns
RemoveJoint(int)
Removes a context-owned joint and releases its filter state.
public bool RemoveJoint(int jointId)
Parameters
jointIdint
Returns
RemoveRagdoll(int)
Removes a registered ragdoll and every joint and collision suppression it owns.
public bool RemoveRagdoll(int ragdollId)
Parameters
ragdollIdint
Returns
SetJointMotorTarget(int, FixedQuaternion)
Updates a joint motor target while preserving the joint's authored motor gains and impulse cap.
public bool SetJointMotorTarget(int jointId, FixedQuaternion targetLocalRotation)
Parameters
jointIdinttargetLocalRotationFixedQuaternion
Returns
SetRagdollPoseTargets(RagdollRuntime3D, ReadOnlySpan<JointMotor3D>)
Applies caller-owned motor payloads to every joint in a ragdoll runtime.
public void SetRagdollPoseTargets(RagdollRuntime3D ragdoll, ReadOnlySpan<JointMotor3D> motors)
Parameters
ragdollRagdollRuntime3DmotorsReadOnlySpan<JointMotor3D>
ShouldExcludeLinkedCollision(LSCollider, LSCollider)
Gets whether the supplied 3D colliders should be excluded because a registered articulation links them.
public bool ShouldExcludeLinkedCollision(LSCollider colliderA, LSCollider colliderB)
Parameters
colliderALSCollidercolliderBLSCollider
Returns
TryGetJoint(int, out Joint3D?)
Tries to get a registered joint by context-local ID.
public bool TryGetJoint(int jointId, out Joint3D? joint)