<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARRaycastQuery/TargetAlignment-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:@E@ARRaycastTargetAlignment"
  },
  "title" : "ARRaycastQuery.TargetAlignment"
}
-->

# ARRaycastQuery.TargetAlignment

A specification that indicates a target’s alignment with respect to gravity

```
enum TargetAlignment
```

## Discussion

A raycast ignores potential targets with an alignment different than the one you specify in the raycast query.

## Topics

### Enumeration Cases

[`case any`](/documentation/ARKit/ARRaycastQuery/TargetAlignment-swift.enum/any)

The case that indicates a target may be aligned in any way with respect to gravity.

[`case horizontal`](/documentation/ARKit/ARRaycastQuery/TargetAlignment-swift.enum/horizontal)

The case that indicates a target is aligned horizontally with respect to gravity.

[`case vertical`](/documentation/ARKit/ARRaycastQuery/TargetAlignment-swift.enum/vertical)

The case that indicates a target is aligned vertically with respect to gravity.

### Initializers

[`init?(rawValue: Int)`](/documentation/ARKit/ARRaycastQuery/TargetAlignment-swift.enum/init(rawValue:))

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)