<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKPhysicsWorld/contactDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKPhysicsWorld(py)contactDelegate"
  },
  "title" : "contactDelegate"
}
-->

# contactDelegate

A delegate that is called when two physics bodies come in contact with each other.

```
unowned(unsafe) var contactDelegate: (any SKPhysicsContactDelegate)? { get set }
```

## Discussion

A contact is created when two physics bodies overlap and one of the physics bodies has a [`contactTestBitMask`](/documentation/SpriteKit/SKPhysicsBody/contactTestBitMask) property that overlaps with the other body’s [`categoryBitMask`](/documentation/SpriteKit/SKPhysicsBody/categoryBitMask) property. By default, a physics body’s [`contactTestBitMask`](/documentation/SpriteKit/SKPhysicsBody/contactTestBitMask) is set to all bits cleared.

---

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)