---
title: "init(mesh:materials:collisionShape:mass:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/modelentity/init(mesh:materials:collisionshape:mass:)"
---

# init(mesh:materials:collisionShape:mass:)

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

## Declaration

```swift
@MainActor @preconcurrency init(mesh: MeshResource, materials: [any Material] = [], collisionShape: ShapeResource, mass: Float)
```

## Parameters

- `mesh`: A mesh that defines the geometry of the model.
- `materials`: Material resources that define the appearance of the model.
- `collisionShape`: A collection of shape resources that define a composite collision shape.
- `mass`: The mass of the model in kilograms.

## See Also

### Creating a model

- [init()](realitykit/modelentity/init().md)
- [init(mesh:materials:)](realitykit/modelentity/init(mesh:materials:).md)
- [init(mesh:materials:collisionShapes:mass:)](realitykit/modelentity/init(mesh:materials:collisionshapes:mass:).md)
