docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Raycast

    Raycast(Ray, TrackableType, Allocator)

    Implementation for the IRaycaster interface. Raycasts against every point cloud.

    Declaration
    public NativeArray<XRRaycastHit> Raycast(Ray rayInSessionSpace, TrackableType trackableTypeMask, Allocator allocator)
    Parameters
    Type Name Description
    Ray rayInSessionSpace

    A Ray, in session space.

    TrackableType trackableTypeMask

    The type of trackables to raycast against. If TrackableType.FeaturePoint is not set, this method returns an empty array.

    Allocator allocator

    The allocator to use for the returned NativeArray.

    Returns
    Type Description
    NativeArray<XRRaycastHit>

    A new NativeArray, allocated using allocator, containing a list of XRRaycastHits of points hit by the raycast.

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, September 22, 2023