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
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Locomotion/Continuous Move Provider", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.ContinuousMoveProvider.html")]
public class ContinuousMoveProvider : LocomotionProvider
Properties
| Name | Description |
|---|---|
| enableFly | Controls whether to enable flying (unconstrained movement). This overrides useGravity. |
| enableStrafe | Controls whether to enable strafing (sideways movement). |
| forwardSource | The source Transform that defines the forward direction. |
| leftHandMoveInput | Reads input data from the left hand controller. Input Action must be a Value action type (Vector 2). |
| moveSpeed | The speed, in units per second, to move forward. |
| rightHandMoveInput | Reads input data from the right hand controller. Input Action must be a Value action type (Vector 2). |
| transformation | The transformation that is used by this component to apply translation movement. |
| useGravity | Controls whether gravity affects this provider when a CharacterController is used. This only applies when enableFly is false. |
Methods
| Name | Description |
|---|---|
| ComputeDesiredMove(Vector2) | Determines how much to slide the rig due to |
| MoveRig(Vector3) | Creates a locomotion event to move the rig by |
| OnDisable() | See MonoBehaviour. |
| OnEnable() | See MonoBehaviour. |
| Update() | See MonoBehaviour. |