<!--
{
  "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/customField(evaluationBlock:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPhysicsField(cm)customFieldWithEvaluationBlock:"
  },
  "title" : "customField(evaluationBlock:)"
}
-->

# 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.

```
class func customField(evaluationBlock block: @escaping SCNFieldForceEvaluator) -> SCNPhysicsField
```

## Parameters

`block`

A block that SceneKit runs for each object in the field’s area of effect. See [`SCNFieldForceEvaluator`](/documentation/SceneKit/SCNFieldForceEvaluator).

## Return Value

A physics field object. To use the field in a scene, attach it to the [`physicsField`](/documentation/SceneKit/SCNNode/physicsField) property of an [`SCNNode`](/documentation/SceneKit/SCNNode) object.

## Discussion

For custom physics fields, SceneKit ignores the [`direction`](/documentation/SceneKit/SCNPhysicsField/direction), [`strength`](/documentation/SceneKit/SCNPhysicsField/strength), [`falloffExponent`](/documentation/SceneKit/SCNPhysicsField/falloffExponent), and [`minimumDistance`](/documentation/SceneKit/SCNPhysicsField/minimumDistance) properties. Instead, SceneKit calls your block to determine the direction and magnitude of force to apply to each physics body or particle in the field’s area of effect.

---

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)