Game Development Community

How to add a light to a model

by AIDan · in Torque Game Engine · 12/14/2001 (10:25 am) · 2 replies

Hi

How can I do that??

Does it work in a way like you add particle systems??

greetings
Daniel

#1
12/15/2001 (9:11 am)
Game objects that want to emit light need to add themselves to the light set (in onAdd) and must provide the registerLights method (overloaded from SceneObject I think). The scene manager queries light emitting objects once per frame in order to setup the scene lights. The manager them optimizes the lights for each object as its rendered.

There is no script interface for this. Some objects, such as mounted images, items, and projectiles are already setup to emit light, and usually have properties setable from script. If you want to add new lighting effects though, you'll have to add them directly in C++ code.
#2
12/15/2001 (9:13 am)
If you just want to add a light on-the-fly from the scripting language, then you can create a mountable image, set it's light properties, and mount it on any ShapeBase object.