Class

SCNPhysicsContact

Detailed information about a contact between two physics bodies in a scene’s physics simulation.

Declaration

@interface SCNPhysicsContact : NSObject

Overview

You don't create SCNPhysicsContact instances directly; SceneKit automatically creates these objects whenever contacts occur.

To receive contact messages, assign your custom class implementing the SCNPhysicsContactDelegate protocol to the contactDelegate property of your scene’s SCNPhysicsWorld obejct. Next, for each physics body in your scene, set the categoryBitMask and collisionBitMask properties to define which interactions should generate contact messages.

Topics

Inspecting the Contact Properties

nodeA

The node containing the first body in the contact.

nodeB

The node containing the second body in the contact.

contactPoint

The contact point between the two physics bodies, in scene coordinates.

contactNormal

The normal vector at the contact point between the two physics bodies, in scene coordinates.

collisionImpulse

The force over time of the collision, in newton-seconds.

penetrationDistance

The distance of overlap, in units of scene coordinate space, between the two physics bodies.

Instance Properties

Relationships

Inherits From

See Also

Collision and Contact Detection

SCNPhysicsContactDelegate

Methods you can implement to respond when a contact or collision occurs between two physics bodies in a scene.