light.createSpot

Section: Light

What it does

light.createSpot creates a Spot in light. It takes id, x, y, z, dX, dY, dZ, angle and exponent. angle and exponent are optional.

Signature

light.createSpot(id, x,y,z, dX,dY,dZ, angle?, exponent?)

Arguments

  • id
  • x
  • y
  • z
  • dX
  • dY
  • dZ
  • angleoptional
  • exponentoptional

Example · generated

function start() {  light.createSpot('spot', 0, 2, 0, 0, 2, 0);}

light.createSpot 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.

14 members in light