---
title: ARConfiguration.WorldAlignment.gravity
framework: arkit
role: symbol
role_heading: Case
path: arkit/arconfiguration/worldalignment-swift.enum/gravity
---

# ARConfiguration.WorldAlignment.gravity

The coordinate system’s y-axis is parallel to gravity, and its origin is the initial position of the device.

## Declaration

```swift
case gravity
```

## Discussion

Discussion The y-axis matches the direction of gravity as detected by the device’s motion sensing hardware; that is, the vector (0,-1,0) points downward. The position and orientation of the device as of when the session configuration is first run determine the rest of the coordinate system: For the z-axis, ARKit chooses a basis vector (0,0,-1) pointing in the direction the device camera faces and perpendicular to the gravity axis. ARKit chooses a x-axis based on the z- and y-axes using the right hand rule—that is, the basis vector (1,0,0) is orthogonal to the other two axes, and (for a viewer looking in the negative-z direction) points toward the right.

## See Also

### Alignments

- [ARConfiguration.WorldAlignment.gravityAndHeading](arkit/arconfiguration/worldalignment-swift.enum/gravityandheading.md)
- [ARConfiguration.WorldAlignment.camera](arkit/arconfiguration/worldalignment-swift.enum/camera.md)
