Class DeviceBasedSnapTurnProvider
A locomotion provider that allows the user to rotate their rig using a specified 2D axis input. The provider can take input from multiple different devices (eg: L and R hands).
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
public class DeviceBasedSnapTurnProvider : SnapTurnProviderBase
Properties
controllers
The XRControllers that allow SnapTurn. An XRController must be enabled in order to Snap Turn.
Declaration
public List<XRBaseController> controllers { get; set; }
Property Value
Type | Description |
---|---|
List<XRBaseController> |
deadZone
The deadzone that the controller movement will have to be above to trigger a snap turn.
Declaration
public float deadZone { get; set; }
Property Value
Type | Description |
---|---|
Single |
turnUsage
The 2D Input Axis on the controller devices that will be used to trigger a snap turn.
Declaration
public DeviceBasedSnapTurnProvider.InputAxes turnUsage { get; set; }
Property Value
Type | Description |
---|---|
DeviceBasedSnapTurnProvider.InputAxes |
Methods
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. |