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

# SKFieldNode

A node that applies physics effects to nearby nodes.

```
class SKFieldNode
```

## Overview

There are many different kinds of field nodes that can be created, each with different effects. The [`SKFieldNode`](/documentation/SpriteKit/SKFieldNode) section lists the field types you can create using SpriteKit, including a type that allows you to apply custom forces to physics bodies. Instantiate the appropriate kind of field node and then add it to the scene’s node tree.

When the scene simulates physics effects, a field node applies its effect to a physics body so long as the following are true:

- The field node is in the scene’s node tree.
- The field node’s [`isEnabled`](/documentation/SpriteKit/SKFieldNode/isEnabled) property is <doc://com.apple.documentation/documentation/Swift/true>.
- The physics body is attached to a node that is in the scene’s node tree.
- The physics body is located inside the field node’s region (see [`region`](/documentation/SpriteKit/SKFieldNode/region)).
- The physics body is not located inside the region of another field node whose [`isExclusive`](/documentation/SpriteKit/SKFieldNode/isExclusive) property is set to <doc://com.apple.documentation/documentation/Swift/true>.
- A logical AND operation between the field node’s [`categoryBitMask`](/documentation/SpriteKit/SKFieldNode/categoryBitMask) property and the physics body’s [`fieldBitMask`](/documentation/SpriteKit/SKPhysicsBody/fieldBitMask) property results in a nonzero value.

> Tip:
> While it is useful to know that SpriteKit measures items in the International System of Units, the precise numbers are not that important. It doesn’t matter much whether your rocket ship weights 1 kilogram or 1,000,000 kilograms, as long as the mass is consistent with other physics values used in the game. Often, proportions are more important than the actual values being used.

## Topics

### Getting Started with Field Nodes

[Adding Physics Fields to a Scene](/documentation/SpriteKit/adding-physics-fields-to-a-scene)

Create effects that interact with your scene’s physics bodies, such as magnetism, repulsion, friction, or a vortex.

### Creating Field Nodes

[`+  dragField`](/documentation/SpriteKit/SKFieldNode/dragField())

Creates a field node that applies a force that resists the motion of physics bodies.

[`+  electricField`](/documentation/SpriteKit/SKFieldNode/electricField())

Creates a field node that applies an electrical force proportional to the electrical charge of physics bodies.

[`+  linearGravityFieldWithVector:`](/documentation/SpriteKit/SKFieldNode/linearGravityField(withVector:))

Creates a field node that accelerates physics bodies in a specific direction.

[`+  magneticField`](/documentation/SpriteKit/SKFieldNode/magneticField())

Creates a field node that applies a magnetic force based on the velocity and electrical charge of the physics bodies.

[`+  noiseFieldWithSmoothness:animationSpeed:`](/documentation/SpriteKit/SKFieldNode/noiseField(withSmoothness:animationSpeed:))

Creates a field node that applies a randomized acceleration to physics bodies.

[`+  radialGravityField`](/documentation/SpriteKit/SKFieldNode/radialGravityField())

Creates a field node that accelerates physics bodies toward the field node.

[`+  springField`](/documentation/SpriteKit/SKFieldNode/springField())

Creates a field node that applies a spring-like force that pulls physics bodies toward the field node.

[`+  turbulenceFieldWithSmoothness:animationSpeed:`](/documentation/SpriteKit/SKFieldNode/turbulenceField(withSmoothness:animationSpeed:))

Creates a field node that applies a randomized acceleration to physics bodies.

[`+  velocityFieldWithTexture:`](/documentation/SpriteKit/SKFieldNode/velocityField(with:))

Creates a field node that sets the velocity of physics bodies that enter the node’s area based on the pixel values of a texture.

[`+  velocityFieldWithVector:`](/documentation/SpriteKit/SKFieldNode/velocityField(withVector:))

Creates a field node that gives physics bodies a constant velocity.

[`+  vortexField`](/documentation/SpriteKit/SKFieldNode/vortexField())

Creates a field node that applies a perpendicular force to physics bodies.

[`+  customFieldWithEvaluationBlock:`](/documentation/SpriteKit/SKFieldNode/customField(evaluationBlock:))

Creates a field node that calculates and applies a custom force to the physics body.

[`SKFieldForceEvaluator`](/documentation/SpriteKit/SKFieldForceEvaluator)

The definition for a custom block that processes a single physics body’s interaction with the field.

### Determining Which Physics Bodies Are Affected by the Field

[`enabled`](/documentation/SpriteKit/SKFieldNode/isEnabled)

A Boolean value that indicates whether the field is active.

[`exclusive`](/documentation/SpriteKit/SKFieldNode/isExclusive)

A Boolean value that indicates whether the field node should override all other field nodes that might otherwise affect physics bodies.

[`region`](/documentation/SpriteKit/SKFieldNode/region)

The area (relative to the node’s origin) that the field affects.

[`minimumRadius`](/documentation/SpriteKit/SKFieldNode/minimumRadius)

The minimum value for distance-based effects.

[`categoryBitMask`](/documentation/SpriteKit/SKFieldNode/categoryBitMask)

A mask that defines which categories this field belongs to.

### Configuring the Strength of the Field

[`strength`](/documentation/SpriteKit/SKFieldNode/strength)

The strength of the field.

[`falloff`](/documentation/SpriteKit/SKFieldNode/falloff)

The exponent that defines the rate of decay for the strength of the field as the distance increases between the node and the physics body being affected.

### Configuring Other Field Properties

These properties are associated with specific types of field nodes.

[`animationSpeed`](/documentation/SpriteKit/SKFieldNode/animationSpeed)

The rate at which a noise or turbulence field node changes.

[`smoothness`](/documentation/SpriteKit/SKFieldNode/smoothness)

The smoothness of the noise used to generate the forces.

[`direction`](/documentation/SpriteKit/SKFieldNode/direction)

The direction of a velocity field node.

[`texture`](/documentation/SpriteKit/SKFieldNode/texture)

A normal texture that specifies the velocities at different points in a velocity field node.

## Relationships

### Conforms To

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

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

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

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

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

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

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

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

[`UIFocusItem`](/documentation/UIKit/UIFocusItem)

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

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

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

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`UICoordinateSpace`](/documentation/UIKit/UICoordinateSpace)

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

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

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

[`UIFocusItemContainer`](/documentation/UIKit/UIFocusItemContainer)

### Inherits From

[`SKNode`](/documentation/SpriteKit/SKNode)

---

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)