docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Ray casts

    The AR Foundation Raycast API allows platforms to cast a ray and calculate the intersection between that ray and detected trackables in the physical environment. You can use this API to cast rays against specific trackable types, without the need to represent these trackables in your scene. The trackable types that you can possibly hit with a ray cast depend on the Supported trackables of your target platform.

    You can use ray casting functionality to enable users to interact with the physical environment. For example, you can implement ray casting in your application so that a user can place virtual objects on detected physical surfaces.

    Refer to the following topics to understand how to use AR Foundation ray casting:

    Topic Description
    Ray cast platform support Discover which AR platforms support ray casting features, and the trackables supported by each AR platform.
    AR Raycast Manager component Understand the AR Raycast Manager component and the types of ray cast methods it provides.
    AR Raycast component Understand the AR Raycast component.

    Additional resources

    • Simple AR sample
    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)