docs.unity3d.com
    Show / Hide Table of Contents

    Class LocomotionProvider

    The LocomotionProvider is the base class for various locomotion implementations. This class provides simple ways to interrogate the LocomotionSystem for whether a locomotion can begin and simple events for hooking into a start/end locomotion.

    Inheritance
    Object
    LocomotionProvider
    ContinuousMoveProviderBase
    ContinuousTurnProviderBase
    SnapTurnProviderBase
    TeleportationProvider
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public abstract class LocomotionProvider : MonoBehaviour

    Properties

    system

    The LocomotionSystem that this LocomotionProvider will communicate with for exclusive access to an XR Rig. If one is not provided, the behavior will attempt to locate one during its Awake call.

    Declaration
    public LocomotionSystem system { get; set; }
    Property Value
    Type Description
    LocomotionSystem

    Methods

    Awake()

    See .

    Declaration
    protected virtual void Awake()

    BeginLocomotion()

    Invokes begin locomotion events.

    Declaration
    protected bool BeginLocomotion()
    Returns
    Type Description
    Boolean

    Returns true if successful. Otherwise, returns false.

    CanBeginLocomotion()

    Checks if locomotion can begin.

    Declaration
    protected bool CanBeginLocomotion()
    Returns
    Type Description
    Boolean

    Returns true if locomotion can start. Otherwise, returns false.

    EndLocomotion()

    Invokes end locomotion events.

    Declaration
    protected bool EndLocomotion()
    Returns
    Type Description
    Boolean

    Returns true if successful. Otherwise, returns false.

    Events

    beginLocomotion

    The beginLocomotion action will be called when a LocomotionProvider successfully begins a locomotion event.

    Declaration
    public event Action<LocomotionSystem> beginLocomotion
    Event Type
    Type Description
    Action<LocomotionSystem>

    endLocomotion

    The endLocomotion action will be called when a LocomotionProvider successfully ends a locomotion event.

    Declaration
    public event Action<LocomotionSystem> endLocomotion
    Event Type
    Type Description
    Action<LocomotionSystem>

    startLocomotion

    (Deprecated) The startLocomotion action will be called when a LocomotionProvider successfully begins a locomotion event.

    Declaration
    public event Action<LocomotionSystem> startLocomotion
    Event Type
    Type Description
    Action<LocomotionSystem>
    See Also
    beginLocomotion
    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