docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LocomotionUtility

    Provides utility functions for locomotion of the XR Origin.

    Inheritance
    object
    LocomotionUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Utilities
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public static class LocomotionUtility

    Methods

    GetCameraFloorWorldPosition(XROrigin)

    Gets the world space position of the projection of the camera position onto the XZ plane of the XR Origin. This should generally be treated as the "user" position for the purposes of locomotion to a destination position.

    Declaration
    public static Vector3 GetCameraFloorWorldPosition(this XROrigin xrOrigin)
    Parameters
    Type Name Description
    XROrigin xrOrigin

    The XR Origin.

    Returns
    Type Description
    Vector3

    Returns the world space position of the projection of the camera position onto the XZ plane of the XR Origin.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)