What it does
mesh.lookAt aims At on a mesh object. It takes id, x, y and z.
Signature
mesh.lookAt(id, x,y,z)Arguments
idxyz
Example · generated
function start() { mesh.createBox('box', { size: 1 }); mesh.lookAt('box', 0, 2, 0);}mesh.createBox is there to give the call something to act on; mesh.lookAt is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.