<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNPhysicsField",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPhysicsField"
  },
  "title" : "SCNPhysicsField"
}
-->

# SCNPhysicsField

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

```
class SCNPhysicsField
```

## 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`](/documentation/SceneKit/SCNNode/physicsField) property of a node in the scene.

Physics fields can affect both [`SCNPhysicsBody`](/documentation/SceneKit/SCNPhysicsBody) objects and the particles spawned by [`SCNParticleSystem`](/documentation/SceneKit/SCNParticleSystem) objects.

## Topics

### Creating Physics Fields

[`+  dragField`](/documentation/SceneKit/SCNPhysicsField/drag())

Creates a field that slows any object in its area of effect with a force proportional to the object’s velocity.

[`+  vortexField`](/documentation/SceneKit/SCNPhysicsField/vortex())

Creates a field whose forces circulate around an axis.

[`+  radialGravityField`](/documentation/SceneKit/SCNPhysicsField/radialGravity())

Creates a field that accelerates objects toward its center.

[`+  linearGravityField`](/documentation/SceneKit/SCNPhysicsField/linearGravity())

Creates a field that accelerates objects in a specific direction.

[`+  noiseFieldWithSmoothness:animationSpeed:`](/documentation/SceneKit/SCNPhysicsField/noiseField(smoothness:animationSpeed:))

Creates a field that applies random forces to objects in its area of effect.

[`+  turbulenceFieldWithSmoothness:animationSpeed:`](/documentation/SceneKit/SCNPhysicsField/turbulenceField(smoothness:animationSpeed:))

Creates a field that applies random forces to objects in its area of effect, with magnitudes proportional to those objects’ velocities.

[`+  springField`](/documentation/SceneKit/SCNPhysicsField/spring())

Creates a field that pulls objects toward its center with a spring-like force.

[`+  electricField`](/documentation/SceneKit/SCNPhysicsField/electric())

Creates a field that attracts or repels objects based on their electrical charge and on their distance from the field’s center.

[`+  magneticField`](/documentation/SceneKit/SCNPhysicsField/magnetic())

Creates a field that attracts or repels objects based on their electrical charge, velocity, and distance from the field’s axis.

### Creating Custom Physics Fields

[`+  customFieldWithEvaluationBlock:`](/documentation/SceneKit/SCNPhysicsField/customField(evaluationBlock:))

Creates a field that runs the specified block to determine the force a field applies to each object in its area of effect.

### Specifying a Field’s Area of Effect

[`halfExtent`](/documentation/SceneKit/SCNPhysicsField/halfExtent)

A location marking the end of the field’s area of effect.

[`scope`](/documentation/SceneKit/SCNPhysicsField/scope)

The area affected by the field, either inside or outside its region.

[`usesEllipsoidalExtent`](/documentation/SceneKit/SCNPhysicsField/usesEllipsoidalExtent)

A Boolean value that determines whether the field’s area of effect is shaped like a box or ellipsoid.

[`offset`](/documentation/SceneKit/SCNPhysicsField/offset)

The offset of the field’s center within its area of effect.

[`direction`](/documentation/SceneKit/SCNPhysicsField/direction)

The field’s directional axis.

### Specifying a Field’s Behavior

[`strength`](/documentation/SceneKit/SCNPhysicsField/strength)

A multiplier for the force that the field applies to objects in its area of effect.

[`falloffExponent`](/documentation/SceneKit/SCNPhysicsField/falloffExponent)

An exponent that determines how the field’s strength diminishes with distance.

[`minimumDistance`](/documentation/SceneKit/SCNPhysicsField/minimumDistance)

The minimum value for distance-based effects.

[`active`](/documentation/SceneKit/SCNPhysicsField/isActive)

A Boolean value that determines whether the field’s effect is enabled.

[`exclusive`](/documentation/SceneKit/SCNPhysicsField/isExclusive)

A Boolean value that determines whether the field overrides other fields whose areas of effect it overlaps.

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

[`categoryBitMask`](/documentation/SceneKit/SCNPhysicsField/categoryBitMask)

A mask that defines which categories this physics field belongs to.

### Constants

[`SCNFieldForceEvaluator`](/documentation/SceneKit/SCNFieldForceEvaluator)

The signature for a block that SceneKit calls to determine the effect of a custom field on an object.

[`SCNPhysicsFieldScope`](/documentation/SceneKit/SCNPhysicsFieldScope)

Options for defining the region of space affected by a physics field, used by the [`scope`](/documentation/SceneKit/SCNPhysicsField/scope) property.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

---

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)