Creates a physics shape from a node or hierarchy of nodes.
- iOS 8.0+
- macOS 10.10+
- tvOS 9.0+
- watchOS 3.0+
A dictionary of options affecting the level of detail of the physics shape, or
nilto use default options. For applicable keys and their possible values, see Shape Creation Options Keys.
A new physics shape object.
The node used to create the physics shape need not be the same as the node whose physics body you attach the shape to—or even be in the scene whose physics world you use the shape in. For example, you can create a physics body for a complex object by building a hierarchy of nodes containing simple geometries (using the
SCNSphere classes), and then creating a physics shape from those nodes. The resulting physics shape, a compound of bounding boxes or convex hulls, provides a rough approximation of the complex object without a high cost to simulation performance.