<!--
{
  "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/SCNPhysicsWorld/contactTestBetween(_:_:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPhysicsWorld(im)contactTestBetweenBody:andBody:options:"
  },
  "title" : "contactTestBetween(_:_:options:)"
}
-->

# contactTestBetween(_:_:options:)

Checks for contacts between two physics bodies.

```
func contactTestBetween(_ bodyA: SCNPhysicsBody, _ bodyB: SCNPhysicsBody, options: [SCNPhysicsWorld.TestOption : Any]? = nil) -> [SCNPhysicsContact]
```

## Parameters

`bodyA`

The first body (to test for contact with the second).

`bodyB`

The second body (to test for contact with the first).

`options`

A dictionary of options affecting the test, or `nil` to use default options. For applicable keys and the possible values, see `Physics Test Options Keys`.

## Return Value

An array of [`SCNPhysicsContact`](/documentation/SceneKit/SCNPhysicsContact) objects describing contacts between the two bodies, or `nil` if the bodies are not in contact.

## Discussion

SceneKit sends messages to the physics world’s [`contactDelegate`](/documentation/SceneKit/SCNPhysicsWorld/contactDelegate) object only when collisions occur between bodies whose [`collisionBitMask`](/documentation/SceneKit/SCNPhysicsBody/collisionBitMask) and [`categoryBitMask`](/documentation/SceneKit/SCNPhysicsBody/categoryBitMask) properties overlap, and only for collisions between certain types of bodies. (For details, see [`SCNPhysicsBodyType`](/documentation/SceneKit/SCNPhysicsBodyType).) Use this method to directly test for contacts between any two bodies at a time of your choosing. For example, to implement a game where the player character can pick up an item, you might call this method when the player presses the “pick up” button to see if the player character is in contact with the item to be picked up.

---

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)