Enumeration Case

ARConfiguration.WorldAlignment.gravityAndHeading

The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device.

Declaration

case gravityAndHeading = 1

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 x- and z-axes match the longitude and latitude directions as measured by Location Services. The vector (0,0,-1) points to true north and the vector (-1,0,0) points west. (That is, the positive x-, y-, and z-axes point east, up, and south, respectively.)

Figure 1

In gravity and heading alignment, all directions are fixed to a real-world reference frame.

Although this option fixes the directions of the three coordinate axes to real-world directions, the location of the coordinate system's origin is still relative to the device, matching the device's position as of when the session configuration is first run.

See Also

Alignments

case gravity

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

case camera

The scene coordinate system is locked to match the orientation of the camera.