docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method GetReticleDirection

    GetReticleDirection(IXRInteractor, Vector3, out Vector3, out Vector3?)

    Get the reticle direction based on the given interactor's attach transform.

    Declaration
    public void GetReticleDirection(IXRInteractor interactor, Vector3 hitNormal, out Vector3 reticleUp, out Vector3? optionalReticleForward)
    Parameters
    Type Name Description
    IXRInteractor interactor

    The interactor whose attach transform determines the reticle direction.

    Vector3 hitNormal

    The normal of the surface the reticle is placed on. This is the default value for reticleUp if the provider does not specify up directionality.

    Vector3 reticleUp

    The returned up direction of the reticle.

    Vector3? optionalReticleForward

    The returned forward direction which will be projected onto the plane defined by reticleUp to determine the reticle's actual forward direction. This will be null if the provider does not specify forward directionality.

    Implements
    IXRReticleDirectionProvider.GetReticleDirection(IXRInteractor, Vector3, out Vector3, out Vector3?)
    In This Article
    Back to top
    Copyright © 2023 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)