---
title: isAffectedByGravity
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnphysicsbody/isaffectedbygravity
---

# isAffectedByGravity

A Boolean value that determines whether the constant gravity of a scene accelerates the body.

## Declaration

```swift
var isAffectedByGravity: Bool { get set }
```

## Discussion

Discussion If this property is true (the default), and the type of the body is SCNPhysicsBodyType.dynamic, the gravity property of the scene’s physicsWorld object causes the body to accelerate. If this property is false, the body is not affected by scene gravity. This option can be useful when making physics bodies whose behavior should be governed by SCNPhysicsField objects instead of a constant global acceleration.

## See Also

### Defining How Forces Affect a Physics Body

- [physicsShape](scenekit/scnphysicsbody/physicsshape.md)
- [type](scenekit/scnphysicsbody/type.md)
- [SCNPhysicsBodyType](scenekit/scnphysicsbodytype.md)
- [velocityFactor](scenekit/scnphysicsbody/velocityfactor.md)
- [angularVelocityFactor](scenekit/scnphysicsbody/angularvelocityfactor.md)
