docs.unity.cn
    Show / Hide Table of Contents

    Class ActionBasedSnapTurnProvider

    A locomotion provider that allows the user to rotate their rig using a 2D axis input from an input system action.

    Inheritance
    Object
    LocomotionProvider
    SnapTurnProviderBase
    ActionBasedSnapTurnProvider
    Inherited Members
    SnapTurnProviderBase.turnAmount
    SnapTurnProviderBase.debounceTime
    SnapTurnProviderBase.enableTurnLeftRight
    SnapTurnProviderBase.enableTurnAround
    SnapTurnProviderBase.Update()
    SnapTurnProviderBase.GetTurnAmount(Vector2)
    SnapTurnProviderBase.StartTurn(Single)
    LocomotionProvider.startLocomotion
    LocomotionProvider.beginLocomotion
    LocomotionProvider.endLocomotion
    LocomotionProvider.system
    LocomotionProvider.Awake()
    LocomotionProvider.CanBeginLocomotion()
    LocomotionProvider.BeginLocomotion()
    LocomotionProvider.EndLocomotion()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public class ActionBasedSnapTurnProvider : SnapTurnProviderBase

    Properties

    leftHandSnapTurnAction

    The Input System Action that will be used to read Snap Turn data sent from the left hand controller. Must be a Control.

    Declaration
    public InputActionProperty leftHandSnapTurnAction { get; set; }
    Property Value
    Type Description
    InputActionProperty

    rightHandSnapTurnAction

    The Input System Action that will be used to read Snap Turn data sent from the right hand controller. Must be a Control.

    Declaration
    public InputActionProperty rightHandSnapTurnAction { get; set; }
    Property Value
    Type Description
    InputActionProperty

    Methods

    OnDisable()

    See .

    Declaration
    protected void OnDisable()

    OnEnable()

    See .

    Declaration
    protected void OnEnable()

    ReadInput()

    Reads the current value of the snap turn input.

    Declaration
    protected override Vector2 ReadInput()
    Returns
    Type Description
    Vector2

    Returns the input vector, such as from a thumbstick.

    Overrides
    SnapTurnProviderBase.ReadInput()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Wednesday, October 27, 2021