Checks for contacts between one physics body and any other bodies in the physics world.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The body to test for contact.
A dictionary of options affecting the test, or
nilto use default options. For applicable keys and the possible values, see Physics Test Options Keys.
An array of
SCNPhysics objects describing contacts between the specified body and any others, or
nil if the body is not in contact with any other bodies.
SceneKit sends messages to the physics world’s contactdelegate object only when collisions occur between bodies whose
category properties overlap, and only for collisions between certain types of bodies. (For details, see
SCNPhysics.) Use this method to directly test for all contacts between one body and any other bodies at a time of your choosing. For example, to implement a game with a “wall jump” effect, you could call this method when the player presses the jump button to see if the player character is in contact with any walls.