Outputs all intersections along the ray sorted in ascending order of distance. Accepts Unity's native 2D screen coordinate (0, 0) starting from the bottom left.
Details
Parameters
raycastManager
The ARRaycastManager this method extends.
screenPoint
2D screen touch position in Unity screen coordinates.
raycastResults
A list of XRRaycastHit if the raycast is successful.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[[["\u003cp\u003eARRaycastManagerExtensions provides methods to perform raycasts against ARStreetscapeGeometry tracked by ARCore.\u003c/p\u003e\n"],["\u003cp\u003eRaycastStreetscapeGeometry function can be used with either screen point or a ray in 3D space.\u003c/p\u003e\n"],["\u003cp\u003eBoth versions of RaycastStreetscapeGeometry return a list of XRRaycastHit if the raycast is successful and true boolean value, otherwise false.\u003c/p\u003e\n"],["\u003cp\u003eResults are sorted in ascending order of distance from the ray origin.\u003c/p\u003e\n"]]],[],null,["# ARRaycastManagerExtensions Class Reference\n\nARRaycastManagerExtensions\n==========================\n\nExtensions to AR Foundation's `ARRaycastManager` class.\n\nSummary\n-------\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [RaycastStreetscapeGeometry](#raycaststreetscapegeometry)`(this `[ARRaycastManager](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARRaycastManager.html)` raycastManager, `[Vector2](https://docs.unity3d.com/ScriptReference/Vector2.html)` screenPoint, ref List\u003c `[XRRaycastHit](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.XRRaycastHit.html)` \u003e raycastResults)` | `bool` Performs a raycast against [ARStreetscapeGeometry](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry)s being tracked by ARCore. |\n| [RaycastStreetscapeGeometry](#raycaststreetscapegeometry)`(this `[ARRaycastManager](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARRaycastManager.html)` raycastManager, `[Ray](https://docs.unity3d.com/ScriptReference/Ray.html)` ray, ref List\u003c `[XRRaycastHit](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.XRRaycastHit.html)` \u003e raycastResults)` | `bool` Performs a raycast against [ARStreetscapeGeometry](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry)s being tracked by ARCore. |\n\nPublic static functions\n-----------------------\n\n### RaycastStreetscapeGeometry\n\n```c#\nbool RaycastStreetscapeGeometry(\n this ARRaycastManager raycastManager,\n Vector2 screenPoint,\n ref List\u003c XRRaycastHit \u003e raycastResults\n)\n``` \nPerforms a raycast against [ARStreetscapeGeometry](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry)s being tracked by ARCore.\n\nOutputs all intersections along the ray sorted in ascending order of distance. Accepts Unity's native 2D screen coordinate (0, 0) starting from the bottom left.\n\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |------------------|--------------------------------------------------------| | `raycastManager` | The `ARRaycastManager` this method extends. | | `screenPoint` | 2D screen touch position in Unity screen coordinates. | | `raycastResults` | A list of `XRRaycastHit` if the raycast is successful. | |\n| **Returns** | `true` if the raycast had a hit, otherwise `false`. |\n\n### RaycastStreetscapeGeometry\n\n```c#\nbool RaycastStreetscapeGeometry(\n this ARRaycastManager raycastManager,\n Ray ray,\n ref List\u003c XRRaycastHit \u003e raycastResults\n)\n``` \nPerforms a raycast against [ARStreetscapeGeometry](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry)s being tracked by ARCore.\n\nOutputs all intersections along the ray sorted in ascending order of distance. Accepts Unity's native 3D coordinates.\n\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |------------------|--------------------------------------------------------| | `raycastManager` | The `ARRaycastManager` this methods extends. | | `ray` | Ray for the origin and direction of the raycast. | | `raycastResults` | A list of `XRRaycastHit` if the raycast is successful. | |\n| **Returns** | `true` if the raycast had a hit, otherwise `false`. |"]]