transform.translate

Section: Transform

What it does

transform.translate takes x, y, z and "local". "local" is optional.

The API says: space defaults to world

Signature

transform.translate(x, y, z, "local"?)

Arguments

  • x
  • y
  • z
  • "local"optional

Example · generated

function update(dt) {  transform.translate(0, 2, 0);}

transform.translate is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.

8 members in transform