# ARRaycastManagerExtensions

Extensions to AR Foundation's `ARRaycastManager` class.

## Summary

| ### Public static functions ||
|---|---|
| `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARRaycastManagerExtensions#raycaststreetscapegeometry(this https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARRaycastManager.html raycastManager, https://docs.unity3d.com/ScriptReference/Vector2.html screenPoint, ref List< https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.XRRaycastHit.html > raycastResults)` | `bool` Performs a raycast against `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry`s being tracked by ARCore. |
| `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARRaycastManagerExtensions#raycaststreetscapegeometry(this https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARRaycastManager.html raycastManager, https://docs.unity3d.com/ScriptReference/Ray.html ray, ref List< https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.XRRaycastHit.html > raycastResults)` | `bool` Performs a raycast against `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry`s being tracked by ARCore. |

## Public static functions

### RaycastStreetscapeGeometry

```c#
bool RaycastStreetscapeGeometry(
  this ARRaycastManager raycastManager,
  Vector2 screenPoint,
  ref List< XRRaycastHit > raycastResults
)
```
Performs a raycast against `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry`s being tracked by ARCore.

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. **Returns** `true` if the raycast had a hit, otherwise `false`.

### RaycastStreetscapeGeometry

```c#
bool RaycastStreetscapeGeometry(
  this ARRaycastManager raycastManager,
  Ray ray,
  ref List< XRRaycastHit > raycastResults
)
```
Performs a raycast against `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/ARStreetscapeGeometry#classGoogle_1_1XR_1_1ARCoreExtensions_1_1ARStreetscapeGeometry`s being tracked by ARCore.

Outputs all intersections along the ray sorted in ascending order of distance. Accepts Unity's native 3D coordinates.


Details 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. **Returns** `true` if the raycast had a hit, otherwise `false`.