lovr.physics.newMeshShape
EditCreates a new MeshShape.
Arguments
| Name | Type | Default | Description |
| vertices | table | The table of vertices in the mesh. Each vertex is a table with 3 numbers. | |
| indices | table | A table of triangle indices representing how the vertices are connected in the Mesh. | |
| scale | vector | nil | An optional scale to apply to the mesh vertices. Can also be provided as 3 numbers. |
Returns
| Name | Type | Description |
| mesh | MeshShape | The new MeshShape. |
Arguments
| Name | Type | Default | Description |
| object | ModelData | Mesh |
An object to use the triangles from. Meshes must use the cpu storage mode.
| |
| scale | vector | nil | An optional scale to apply to the mesh vertices. Can also be provided as 3 numbers. |
Returns
| Name | Type | Description |
| mesh | MeshShape | The new MeshShape. |
Clones an existing MeshShape, which is faster than passing the same mesh multiple times. Clones can have their own scale. The clone's scale doesn't get multiplied with the scale of the template.
Arguments
| Name | Type | Default | Description |
| template | MeshShape | An existing MeshShape to clone. | |
| scale | vector | nil | An optional scale to apply to the mesh vertices. Can also be provided as 3 numbers. |
Returns
| Name | Type | Description |
| mesh | MeshShape | The new MeshShape. |