docs.unity3d.com
    Show / Hide Table of Contents

    Class ContinuousTurnProviderBase

    Locomotion provider that allows the user to smoothly rotate their rig continuously over time.

    Inheritance
    Object
    LocomotionProvider
    ContinuousTurnProviderBase
    ActionBasedContinuousTurnProvider
    DeviceBasedContinuousTurnProvider
    Inherited Members
    LocomotionProvider.startLocomotion
    LocomotionProvider.beginLocomotion
    LocomotionProvider.endLocomotion
    LocomotionProvider.system
    LocomotionProvider.Awake()
    LocomotionProvider.CanBeginLocomotion()
    LocomotionProvider.BeginLocomotion()
    LocomotionProvider.EndLocomotion()
    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 input vector.

    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()

    See Also

    LocomotionProvider
    SnapTurnProviderBase
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023