<!--
{
  "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/SCNPhysicsBody/continuousCollisionDetectionThreshold",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPhysicsBody(py)continuousCollisionDetectionThreshold"
  },
  "title" : "continuousCollisionDetectionThreshold"
}
-->

# continuousCollisionDetectionThreshold

The minimum distance the body must travel for SceneKit to apply a more precise (but more costly) algorithm to detect contacts with other bodies.

```
var continuousCollisionDetectionThreshold: CGFloat { get set }
```

## Discussion

SceneKit’s physics engine can employ two kinds of collision detection:

- With *discrete* collision detection, when SceneKit simulates physics before rendering each frame (see [`timeStep`](/documentation/SceneKit/SCNPhysicsWorld/timeStep) and [`SCNSceneRendererDelegate`](/documentation/SceneKit/SCNSceneRendererDelegate)), it updates the position of each physics body based on the body’s velocity during that time interval, then checks to see whether the body at its new position intersects other bodies.
- With *continuous* collision detection, SceneKit calculates the volume that will be traversed by a body during each frame, then checks to see whether that volume intersects other bodies.

This property’s value defaults to `0.0`, resulting in discrete collision detection at all times. When this value is nonzero, SceneKit applies continuous collision whenever the body travels more than the specified distance within one [`timeStep`](/documentation/SceneKit/SCNPhysicsWorld/timeStep).

Discrete collision detection offers high performance, but can lead to inaccurate results for small, fast-moving bodies. Continuous collision detection has a performance cost and works only for spherical physics shapes, but provides more accurate results.

For example, in a game involving projectiles and targets, a small projectile may pass through a target if it moves farther than the target’s thickness within one time step. By setting the projectile’s [`continuousCollisionDetectionThreshold`](/documentation/SceneKit/SCNPhysicsBody/continuousCollisionDetectionThreshold) to match its diameter, you ensure that SceneKit always detects collisions between the projectile and other objects.

---

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)