---
title: radialGravity()
framework: scenekit
role: symbol
role_heading: Type Method
path: scenekit/scnphysicsfield/radialgravity()
---

# radialGravity()

Creates a field that accelerates objects toward its center.

## Declaration

```swift
class func radialGravity() -> SCNPhysicsField
```

## Return Value

Return Value A physics field object. To use the field in a scene, attach it to the physicsField property of an SCNNode object.

## Discussion

Discussion Because the force of gravity on an object is proportional to the object’s mass, this force accelerates all objects at the same distance from the field’s center by the same amount. The field’s strength property measures this acceleration in meters per second per second. By default, a radial gravity field attracts objects toward its center. To make it repel objects instead, set the field’s strength property to a negative value. The default falloffExponent value for a radial gravity field is 2.0, indicating that the field’s effect diminishes with the square of distance from its center.

## See Also

### Creating Physics Fields

- [drag()](scenekit/scnphysicsfield/drag().md)
- [vortex()](scenekit/scnphysicsfield/vortex().md)
- [linearGravity()](scenekit/scnphysicsfield/lineargravity().md)
- [noiseField(smoothness:animationSpeed:)](scenekit/scnphysicsfield/noisefield(smoothness:animationspeed:).md)
- [turbulenceField(smoothness:animationSpeed:)](scenekit/scnphysicsfield/turbulencefield(smoothness:animationspeed:).md)
- [spring()](scenekit/scnphysicsfield/spring().md)
- [electric()](scenekit/scnphysicsfield/electric().md)
- [magnetic()](scenekit/scnphysicsfield/magnetic().md)
