Class ContinuousTurnProviderBase
Locomotion provider that allows the user to smoothly rotate their rig continuously over time.
Inherited Members
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)
Rotate 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
Declaration
protected void Update()