Class ContinuousTurnProvider
Locomotion provider that allows the user to smoothly rotate 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.Turning
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Locomotion/Continuous Turn Provider", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Turning.ContinuousTurnProvider.html")]
public class ContinuousTurnProvider : LocomotionProvider
Properties
leftHandTurnInput
Reads input data from the left hand controller. Input Action must be a Value action type (Vector 2).
Declaration
public XRInputValueReader<Vector2> leftHandTurnInput { get; set; }
Property Value
Type | Description |
---|---|
XRInputValueReader<Vector2> |
See Also
rightHandTurnInput
Reads input data from the right hand controller. Input Action must be a Value action type (Vector 2).
Declaration
public XRInputValueReader<Vector2> rightHandTurnInput { get; set; }
Property Value
Type | Description |
---|---|
XRInputValueReader<Vector2> |
See Also
transformation
The transformation that is used by this component to apply turn movement.
Declaration
public XRBodyYawRotation transformation { get; set; }
Property Value
Type | Description |
---|---|
XRBodyYawRotation |
See Also
turnSpeed
The number of degrees/second clockwise to rotate when turning clockwise.
Declaration
public float turnSpeed { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
Methods
GetTurnAmount(Vector2)
Determines the turn amount in degrees for the given input
vector.
Declaration
protected virtual float GetTurnAmount(Vector2 input)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | input | Input vector, such as from a thumbstick. |
Returns
Type | Description |
---|---|
float | Returns the turn amount in degrees for the given |
See Also
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
See Also
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
See Also
TurnRig(float)
Rotates the rig by turnAmount
degrees.
Declaration
protected void TurnRig(float turnAmount)
Parameters
Type | Name | Description |
---|---|---|
float | turnAmount | The amount of rotation in degrees. |
See Also
Update()
See MonoBehaviour.
Declaration
protected void Update()