Instance Property

contactNormal

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

Declaration

@property(nonatomic, readonly) SCNVector3 contactNormal;

Discussion

This vector tells you which direction the bodies were moving relative to one another at the time of the collision. For example, in a game you can examine this vector to have enemy characters take damage when struck from above by the player character but damage the player character instead when they collide side-to-side.

See Also

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.

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.