Class ConstrainedMoveProvider
Base class for a locomotion provider that allows for constrained movement with a CharacterController.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public abstract class ConstrainedMoveProvider : LocomotionProvider
Properties
enableFreeXMovement
Controls whether to enable unconstrained movement along the x-axis.
Declaration
public bool enableFreeXMovement { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
enableFreeYMovement
Controls whether to enable unconstrained movement along the y-axis.
Declaration
public bool enableFreeYMovement { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
enableFreeZMovement
Controls whether to enable unconstrained movement along the z-axis.
Declaration
public bool enableFreeZMovement { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
gravityMode
Controls when gravity begins to take effect.
Declaration
public ConstrainedMoveProvider.GravityApplicationMode gravityMode { get; set; }
Property Value
Type | Description |
---|---|
ConstrainedMoveProvider.GravityApplicationMode |
See Also
useGravity
Controls whether gravity applies to constrained axes when a CharacterController is used.
Declaration
public bool useGravity { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
Methods
ComputeDesiredMove(out bool)
Determines how much to move the rig.
Declaration
protected abstract Vector3 ComputeDesiredMove(out bool attemptingMove)
Parameters
Type | Name | Description |
---|---|---|
bool | attemptingMove | Whether the provider is attempting to move. |
Returns
Type | Description |
---|---|
Vector3 | Returns the translation amount in world space to move the rig. |
See Also
MoveRig(Vector3)
Creates a locomotion event to move the rig by translationInWorldSpace
,
and optionally restricts movement along each axis and applies gravity.
Declaration
protected virtual void MoveRig(Vector3 translationInWorldSpace)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translationInWorldSpace | The translation amount in world space to move the rig (before restricting movement along each axis and applying gravity). |
See Also
Update()
See MonoBehaviour.
Declaration
protected void Update()