<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhotogrammetrySample/gravity",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation20PhotogrammetrySampleV7gravitySo14CMAccelerationaSgvp"
  },
  "title" : "gravity"
}
-->

# gravity

An image’s gravity vector.

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

## 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.

---

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)