---
title: "makeRaycastQuery(from:allowing:alignment:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/arview/makeraycastquery(from:allowing:alignment:)"
---

# makeRaycastQuery(from:allowing:alignment:)

Creates a ray-cast query originating from a point in the view, centered on the camera’s field of view.

## Declaration

```swift
@MainActor @preconcurrency func makeRaycastQuery(from point: CGPoint, allowing target: ARRaycastQuery.Target, alignment: ARRaycastQuery.TargetAlignment) -> ARRaycastQuery?
```

## Parameters

- `point`: A point in the view’s coordinate system.
- `target`: The type of target where the ray should terminate.
- `alignment`: The alignment of the target.

## Return Value

Return Value A query result.

## See Also

### Finding entities at a point in the view

- [entity(at:)](realitykit/arview/entity(at:).md)
- [entities(at:)](realitykit/arview/entities(at:).md)
- [hitTest(_:query:mask:)](realitykit/arview/hittest(_:query:mask:).md)
- [hitTest(_:types:)](realitykit/arview/hittest(_:types:).md)
- [raycast(from:allowing:alignment:)](realitykit/arview/raycast(from:allowing:alignment:).md)
- [trackedRaycast(from:allowing:alignment:updateHandler:)](realitykit/arview/trackedraycast(from:allowing:alignment:updatehandler:).md)
