Searches for physics bodies in the space formed by moving a convex shape through the physics world.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
A physics shape. This shape must enclose a convex volume. For details on creating shapes that satisfy this requirement, see
A transform matrix representing the initial position and orientation of the shape.
A transform matrix representing the final position and orientation of the shape.
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 any contacts that would occur when moving the physics shape through the physics world.
Use this method when it’s important to plan for (or avoid) collisions ahead of the physics simulation. For example, in a game you might plan maneuvers for a flying character to fit through the gaps between static bodies in the physics world, as illustrated below: