Interface IConstrainedXRBodyManipulator
Interface for an object that can perform movement of an XRMovableBody that is constrained by collision based on where the user's body is.
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public interface IConstrainedXRBodyManipulator
Properties
isGrounded
Whether the linkedBody is touching the ground, as of the most recent call to MoveBody(Vector3).
Declaration
bool isGrounded { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
lastCollisionFlags
Flags indicating the direction of the collision from the most recent call to MoveBody(Vector3).
Declaration
CollisionFlags lastCollisionFlags { get; }
Property Value
Type | Description |
---|---|
CollisionFlags |
See Also
linkedBody
The body whose originTransform to move.
Declaration
XRMovableBody linkedBody { get; }
Property Value
Type | Description |
---|---|
XRMovableBody |
See Also
Methods
MoveBody(Vector3)
Applies the given motion to linkedBody. A collision can constrain the movement from taking place.
Declaration
CollisionFlags MoveBody(Vector3 motion)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | motion | Amount of translation to apply. |
Returns
Type | Description |
---|---|
CollisionFlags | Returns flags that indicate the direction of the collision, if there was one. |
See Also
OnLinkedToBody(XRMovableBody)
Called after the given body links this manipulator to it. The implementation should ensure that
linkedBody points to body
after this method is called.
Declaration
void OnLinkedToBody(XRMovableBody body)
Parameters
Type | Name | Description |
---|---|---|
XRMovableBody | body | The body linked with this manipulator. |
See Also
OnUnlinkedFromBody()
Called when a body unlinks this manipulator from it. The implementation should ensure that linkedBody returns null after this method is called.
Declaration
void OnUnlinkedFromBody()