ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. createMeshObject

Function

createMeshObject

ClientGame engineTrilogy Hub only

Places a model from engineLoadMesh in the world, only for this player: position, rotation and scale. Control the object with the setMeshObject* functions.

Syntax

meshobject createMeshObject(mesh mesh, float x, y, z [, float rx, ry, rz = 0, float scale = 1])

Arguments

meshmesh
The model.
x, y, zfloat
Position.
rx, ry, rzfloat, optional = 0
Rotation.
scalefloat, optional = 1
Scale.

Returns

The object or false.

Example

local mesh = engineLoadMesh("modele/pomnik.glb")
local statue = mesh and createMeshObject(mesh, 2495, -1680, 13.5, 0, 0, 90, 1.5)

See also