Class ActionBasedSnapTurnProvider
A locomotion provider that allows the user to rotate their rig using a 2D axis input from an input system action.
Inheritance
ActionBasedSnapTurnProvider
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
[AddComponentMenu("XR/Locomotion/Snap Turn Provider (Action-based)", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.4/api/UnityEngine.XR.Interaction.Toolkit.ActionBasedSnapTurnProvider.html")]
public class ActionBasedSnapTurnProvider : SnapTurnProviderBase
Properties
leftHandSnapTurnAction
The Input System Action that Unity uses to read Snap Turn data sent from the left hand controller. Must be a Value Vector2Control Control.
Declaration
public InputActionProperty leftHandSnapTurnAction { get; set; }
Property Value
Type | Description |
---|---|
InputActionProperty |
rightHandSnapTurnAction
The Input System Action that Unity uses to read Snap Turn data sent from the right hand controller. Must be a Value Vector2Control Control.
Declaration
public InputActionProperty rightHandSnapTurnAction { get; set; }
Property Value
Type | Description |
---|---|
InputActionProperty |
Methods
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
ReadInput()
Reads the current value of the snap turn input.
Declaration
protected override Vector2 ReadInput()
Returns
Type | Description |
---|---|
Vector2 | Returns the input vector, such as from a thumbstick. |