Light.moveLight method


This is a test of the Emergency Filtering Network.
santa with transparent background
Cone:


Point:

The MoveLight method applies to point and cone lights only. It won't affect an ambient light source.
For point light sources the method changes the location of the source of the light, x,y,z.
For cone light sources the method changes the location of the focus, x,y.

The text and two santas have the same original cone light settings and the moves are the same for all. This is really hard to see on the text.

You can see that by using a loop in SCRIPT you could animate the cone light's motion.
Try clicking quickly on the Move buttons in turn from 1 to 4 and back to 1. There can be a noticeable lag in response time. Be cautious about adding a lot of lights and motion. Your processor has to recalculate a lot of things for moving lights. You might wind up with some unexpected (and thus probably undesirable!) effects if too much is going on at once.


What you should see

To save download time, the images show the moves for Cone and Point both.

Original
text and santas at start with cone and point lights

Move 1
text and santas after Move 1 buttons clicked

Move2
text and santas after Move 2 buttons clicked

Move 3
text and santas after Move 3 buttons clicked

Move 4
text and santas after Move 4 buttons clicked


Syntax & Settings

An example of moveLight for a cone:

santa.filters.light.movelight(0,100,200,0,1)

which moves the santa's first light source's focus to the point (100,200,0), measured relative to the object.

In SCRIPT the general form for Light.moveLight is:

object.filters.Light.MoveLight(lightnumber, x, y, z, fAbsolute)

Object is the ID of the visual object that has a light.
Lightnumber is the identifying number of the particular light source defined on the object, from 0 to 9. The order in which the lights are defined determines the index number.
x,y,z are the coordinates of the new focus for the light cone.
fAbsolute sets whether the move is to absolute or relative coordinates, 0 or 1.


© 1997-2002 Jan Smith   <jegs1@jegsworks.com>