A right rectangular pyramid geometry.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A pyramid defines the surface of a solid whose base is a rectangle, and whose four triangular side faces converge at a point centered above its base. Define the shape of the pyramid’s base in the x- and z-axis dimensions of its local coordinate space with the
length properties, and its extent in the y-axis dimension with the
height property. To position and orient a pyramid in a scene, attach it to the
geometry property of an
Control the level of detail with the
height properties. A higher segment count produces more vertices, which can improve rendering quality for certain lighting models or custom shader effects, but at a cost to rendering performance.
A pyramid contains five
SCNGeometry objects, corresponding to its base and each of its four sides. SceneKit can render each element using a different material. For details, see the
materials property in