Class ConstrainedMoveProvider
Base class for a locomotion provider that allows for constrained movement with a CharacterController.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
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 |
---|---|
Boolean |
enableFreeYMovement
Controls whether to enable unconstrained movement along the y-axis.
Declaration
public bool enableFreeYMovement { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
enableFreeZMovement
Controls whether to enable unconstrained movement along the z-axis.
Declaration
public bool enableFreeZMovement { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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 |
---|---|
Boolean |
Methods
ComputeDesiredMove(out Boolean)
Determines how much to move the rig.
Declaration
protected abstract Vector3 ComputeDesiredMove(out bool attemptingMove)
Parameters
Type | Name | Description |
---|---|---|
Boolean | attemptingMove | Whether the provider is attempting to move. |
Returns
Type | Description |
---|---|
Vector3 | Returns the translation amount in world space to move the rig. |
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). |
Update()
See MonoBehaviour.
Declaration
protected void Update()