transform.lookAt

Section: Transform

What it does

transform.lookAt aims At on a transform object. It takes x, y and z.

Signature

transform.lookAt(x, y, z)

Arguments

  • x
  • y
  • z

Example · generated

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

transform.lookAt 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