Initializer

init(mesh:materials:)

Creates a model entity with a particular mesh and set of materials.

Declaration

init(mesh: MeshResource, materials: [Material] = [])

Parameters

mesh

A mesh that defines the geometry of the model.

materials

Material resources that define the appearance of the model.

See Also

Creating a Model

init()

Creates a model entity.

init(mesh: MeshResource, materials: [Material], collisionShape: ShapeResource, mass: Float)

Creates a model entity with a particular mesh, set of materials, collision shape, and mass.

init(mesh: MeshResource, materials: [Material], collisionShapes: [ShapeResource], mass: Float)

Creates a model entity with a particular mesh, set of materials, a composite collision shape, and mass.

func clone(recursive: Bool) -> Self

Duplicates a model entity to create a new entity.