<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARFrame/raycastQuery(from:allowing:alignment:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(cs)ARFrame(im)raycastQueryFromPoint:allowingTarget:alignment:"
  },
  "title" : "raycastQuery(from:allowing:alignment:)"
}
-->

# raycastQuery(from:allowing:alignment:)

Get a ray-cast query for a screen point.

```
func raycastQuery(from point: CGPoint, allowing target: ARRaycastQuery.Target, alignment: ARRaycastQuery.TargetAlignment) -> ARRaycastQuery
```

## Parameters

`point`

A normalized coordinate in the UI system, where 0 is top-left, and 1 is bottom-right.

`target`

The types of plane you allow this ray cast to intersect with.

`alignment`

An alignment with respect to gravity a plane must have to interset this ray.

## Discussion

To cast the ray, you pass the resulting query to your current session via [`raycast(_:)`](/documentation/ARKit/ARSession/raycast(_:)) or [`trackedRaycast(_:updateHandler:)`](/documentation/ARKit/ARSession/trackedRaycast(_:updateHandler:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)