<!--
{
  "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/SCNFieldForceEvaluator",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:@T@SCNFieldForceEvaluator"
  },
  "title" : "SCNFieldForceEvaluator"
}
-->

# SCNFieldForceEvaluator

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

```
typealias SCNFieldForceEvaluator = (SCNVector3, SCNVector3, Float, Float, TimeInterval) -> SCNVector3
```

## Discussion

You use this type of block to create a custom physics field with the [`customField(evaluationBlock:)`](/documentation/SceneKit/SCNPhysicsField/customField(evaluationBlock:)) method. SceneKit calls your block once for each object in the field’s area of effect, on each step of the physics simulation.

> Note:
> By default, one simulation step occurs for each frame rendered. For example, if your view renders at 60 frames per second and three bodies are in the field’s area of effect, SceneKit runs your block 180 times per second. To avoid reduced rendering performance, take care not to perform extensive computation in this block.

The block takes the following parameters:

- position: The position of the object affected by the field, in the local coordinate space of the node containing the field.
- velocity: The velocity of the object affected by the field, relative to the local coordinate space of the node containing the field.
- mass: The mass of the object affected by the field. (See the [`mass`](/documentation/SceneKit/SCNPhysicsBody/mass) property for physics bodies and the [`particleMass`](/documentation/SceneKit/SCNParticleSystem/particleMass) property for particle systems.)
- charge: The electrical charge of the object affected by the field. (See the [`charge`](/documentation/SceneKit/SCNPhysicsBody/charge) property for physics bodies and the [`particleCharge`](/documentation/SceneKit/SCNParticleSystem/particleCharge) property for particle systems.)
- time: The elapsed time, in seconds, since the last simulation step.

Your block uses these parameters to compute and return an [`SCNVector3`](/documentation/SceneKit/SCNVector3) force vector, which SceneKit then applies to the object affected by the field.

---

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)