---
title: gravity
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/photogrammetrysample/gravity
---

# gravity

An image’s gravity vector.

## Declaration

```swift
var gravity: CMAcceleration? { get set }
```

## Discussion

Discussion Some cameras, including iPhone cameras, capture a gravity vector for each image. This vector indicates the orientation of the camera at the moment you took the picture. RealityKit uses this gravity vector to improve landmark matching with the other images in the session.

## See Also

### Describing the sample

- [image](realitykit/photogrammetrysample/image.md)
- [metadata](realitykit/photogrammetrysample/metadata.md)
- [depthDataMap](realitykit/photogrammetrysample/depthdatamap.md)
- [objectMask](realitykit/photogrammetrysample/objectmask.md)
