Class GrabMoveProvider
Locomotion provider that allows the user to move as if grabbing the whole world around them. When the controller moves, the XR Origin counter-moves in order to keep the controller fixed relative to the world.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Locomotion/Grab Move Provider", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.GrabMoveProvider.html")]
public class GrabMoveProvider : ConstrainedMoveProvider
Properties
| Name | Description |
|---|---|
| canMove | Controls whether this provider can move the XR Origin. |
| controllerTransform | The controller Transform that will drive grab movement with its local position. Will use this GameObject's Transform if not set. |
| enableMoveWhileSelecting | Controls whether to allow grab move locomotion while the controller is selecting an interactable. |
| grabMoveInput | Input data that will be used to perform grab movement while held. If the source is an Input Action, it must have a button-like interaction where phase equals performed when pressed. Typically a ButtonControl Control or a Value type action with a Press interaction. |
| moveFactor | The ratio of actual movement distance to controller movement distance. |
Methods
| Name | Description |
|---|---|
| Awake() | See MonoBehaviour. |
| ComputeDesiredMove(out bool) | Determines how much to move the rig. |
| IsGrabbing() | Determines whether grab move is active. |
| OnDisable() | See MonoBehaviour. |
| OnEnable() | See MonoBehaviour. |