What it does
mesh.setParent sets Parent on a mesh object. It takes id and parentId.
Signature
mesh.setParent(id, parentId)Arguments
idparentId
Example · generated
function start() { mesh.createBox('box', { size: 1 }); mesh.setParent('box', 'box');}mesh.createBox is there to give the call something to act on; mesh.setParent is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.