What it does
update is a lifecycle function: you write it in your script and the engine calls it. The engine calls it: every frame, dt in seconds. It receives dt.
The API says: every frame, dt in seconds
Signature
update(dt)Arguments
dt
Example · generated
function update(dt) { transform.translate(0, 0, 2 * dt);}update is not called, it is written. The engine calls it: every frame, dt in seconds. The body shown here is an example of what goes in it.