What it does
camera.follow acts on camera: it follows. It takes targetId and offset. offset is optional.
Signature
camera.follow(targetId, offset?)Arguments
targetIdoffsetoptional
Example · generated
function start() { camera.follow('main');}camera.follow is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.