Class ContinuousTurnProviderBase
Locomotion provider that allows the user to smoothly rotate their rig continuously over time.
Inheritance
ContinuousTurnProviderBase
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
public abstract class ContinuousTurnProviderBase : LocomotionProvider
Properties
turnSpeed
The number of degrees/second clockwise to rotate when turning clockwise.
Declaration
public float turnSpeed { get; set; }
Property Value
Type | Description |
---|---|
Single |
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 |
---|---|
Single | Returns the turn amount in degrees for the given |
ReadInput()
Reads the current value of the turn input.
Declaration
protected abstract Vector2 ReadInput()
Returns
Type | Description |
---|---|
Vector2 | Returns the input vector, such as from a thumbstick. |
TurnRig(Single)
Rotates the rig by turnAmount
degrees.
Declaration
protected void TurnRig(float turnAmount)
Parameters
Type | Name | Description |
---|---|---|
Single | turnAmount | The amount of rotation in degrees. |
Update()
See MonoBehaviour.
Declaration
protected void Update()