Class ContinuousMoveProviderBase
Locomotion provider that allows the user to smoothly move their rig continuously over time.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public abstract class ContinuousMoveProviderBase : LocomotionProvider
Properties
enableFly
Controls whether to enable flying (unconstrained movement). This overrides useGravity.
Declaration
public bool enableFly { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
enableStrafe
Controls whether to enable strafing (sideways movement).
Declaration
public bool enableStrafe { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
forwardSource
The source Transform that defines the forward direction.
Declaration
public Transform forwardSource { get; set; }
Property Value
Type | Description |
---|---|
Transform |
See Also
gravityApplicationMode
Controls when gravity begins to take effect.
Declaration
public ContinuousMoveProviderBase.GravityApplicationMode gravityApplicationMode { get; set; }
Property Value
Type | Description |
---|---|
ContinuousMoveProviderBase.GravityApplicationMode |
See Also
moveSpeed
The speed, in units per second, to move forward.
Declaration
public float moveSpeed { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
useGravity
Controls whether gravity affects this provider when a CharacterController is used. This only applies when enableFly is false.
Declaration
public bool useGravity { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
Methods
ComputeDesiredMove(Vector2)
Determines how much to slide the rig due to input
vector.
Declaration
protected virtual Vector3 ComputeDesiredMove(Vector2 input)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | input | Input vector, such as from a thumbstick. |
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 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 (pre-gravity). |
See Also
ReadInput()
Reads the current value of the move input.
Declaration
protected abstract Vector2 ReadInput()
Returns
Type | Description |
---|---|
Vector2 | Returns the input vector, such as from a thumbstick. |
See Also
Update()
See MonoBehaviour.
Declaration
protected void Update()