Class ContinuousMoveProvider
Locomotion provider that allows the user to smoothly move their rig continuously over time based on read input values, such as from the controller thumbstick.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion.Movement
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Locomotion/Continuous Move Provider", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Movement.ContinuousMoveProvider.html")]
public class ContinuousMoveProvider : 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
leftHandMoveInput
Reads input data from the left hand controller. Input Action must be a Value action type (Vector 2).
Declaration
public XRInputValueReader<Vector2> leftHandMoveInput { get; set; }
Property Value
Type | Description |
---|---|
XRInputValueReader<Vector2> |
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
rightHandMoveInput
Reads input data from the right hand controller. Input Action must be a Value action type (Vector 2).
Declaration
public XRInputValueReader<Vector2> rightHandMoveInput { get; set; }
Property Value
Type | Description |
---|---|
XRInputValueReader<Vector2> |
See Also
transformation
The transformation that is used by this component to apply translation movement.
Declaration
public XROriginMovement transformation { get; set; }
Property Value
Type | Description |
---|---|
XROriginMovement |
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
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
See Also
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
See Also
Update()
See MonoBehaviour.
Declaration
protected void Update()