A representation of a physical object that RealityKit renders and optionally simulates.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
Use one or more model entities to place physical objects in a scene. In addition to the components they inherit from the
Entity class, model entities have geometry, described by their
Model. Model entities acquire the model component by conforming to the
Has protocol. You specify meshes and materials to control how a model entity appears.
Models respond to physics simulations because they conform to the
Has protocol. You give them mass and other physical properties with a
Physics instance, and then apply forces or impulses. The simulator uses a
Physics to manage the linear and angular velocity of the object. Alternatively, you can selectively circumvent the simulation to control position and velocity yourself. Do this for a given model by setting its physics body
Models can also collide with one another, and with other entities that conform to the
Has protocol. The
Collision provides parameters that let you manage which models collide with each other. It also lets you control the collision shape, which for performance reasons, is typically simpler than the visual geometry.