World:newMeshCollider

Adds a new Collider to the World with a MeshShape already attached.

collider = World:newMeshCollider(vertices, indices)

Arguments

NameTypeDescription
verticestableThe table of vertices in the mesh. Each vertex is a table with 3 numbers.
indicestableA table of triangle indices representing how the vertices are connected in the Mesh.

Returns

NameTypeDescription
colliderColliderThe new Collider.

See also