Detailed information about a contact between two physics bodies in a scene’s physics simulation.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
You don't create
SCNPhysics instances directly; SceneKit automatically creates these objects whenever contacts occur.
To receive contact messages, assign your custom class implementing the
SCNPhysics protocol to the
contact property of your scene’s
SCNPhysics obejct. Next, for each physics body in your scene, set the
collision properties to define which interactions should generate contact messages.