Class ContinuousTurnProviderBase
Locomotion provider that allows the user to smoothly rotate their rig continuously over time.
Inheritance
ContinuousTurnProviderBase
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
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 |
---|---|
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
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. |
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()