---
title: SCNPhysicsField
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scnphysicsfield
---

# SCNPhysicsField

An object that applies forces, such as gravitation, electromagnetism, and turbulence, to physics bodies within a certain area of effect.

## Declaration

```swift
class SCNPhysicsField
```

## Overview

Overview You can create many types of field effects, such as gravitation, electromagnetism, and turbulence. To add a field effect to a scene, you create a physics field of the type you want to use and then attach it to the physicsField property of a node in the scene. Physics fields can affect both SCNPhysicsBody objects and the particles spawned by SCNParticleSystem objects.

## Topics

### Creating Physics Fields

- [drag()](scenekit/scnphysicsfield/drag().md)
- [vortex()](scenekit/scnphysicsfield/vortex().md)
- [radialGravity()](scenekit/scnphysicsfield/radialgravity().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)

### Creating Custom Physics Fields

- [customField(evaluationBlock:)](scenekit/scnphysicsfield/customfield(evaluationblock:).md)

### Specifying a Field’s Area of Effect

- [halfExtent](scenekit/scnphysicsfield/halfextent.md)
- [scope](scenekit/scnphysicsfield/scope.md)
- [usesEllipsoidalExtent](scenekit/scnphysicsfield/usesellipsoidalextent.md)
- [offset](scenekit/scnphysicsfield/offset.md)
- [direction](scenekit/scnphysicsfield/direction.md)

### Specifying a Field’s Behavior

- [strength](scenekit/scnphysicsfield/strength.md)
- [falloffExponent](scenekit/scnphysicsfield/falloffexponent.md)
- [minimumDistance](scenekit/scnphysicsfield/minimumdistance.md)
- [isActive](scenekit/scnphysicsfield/isactive.md)
- [isExclusive](scenekit/scnphysicsfield/isexclusive.md)

### Choosing Physics Bodies to Be Affected by the Field

- [categoryBitMask](scenekit/scnphysicsfield/categorybitmask.md)

### Constants

- [SCNFieldForceEvaluator](scenekit/scnfieldforceevaluator.md)
- [SCNPhysicsFieldScope](scenekit/scnphysicsfieldscope.md)

### Initializers

- [init(coder:)](scenekit/scnphysicsfield/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Physics in a Scene

- [SCNPhysicsWorld](scenekit/scnphysicsworld.md)
- [SCNPhysicsBehavior](scenekit/scnphysicsbehavior.md)
