Game Development Community

Headlights for cars - need urgent help

by Ian Roach · in Artist Corner · 12/11/2005 (2:44 am) · 2 replies

Hi guys, since the search tool isnt working i cant search older threads for an answer.

basically i want to add working headlights to our car models.on the model we have a light0 and a light1 node

but how do we mount a light to these headlights igname? one that follows as your drive ?we are also using the lightingpack if that helps at all.

does anyone having working headlights on there models to share ? we are pretty sure the models setup correctly. we just need the code /script side of things.


Heres a pic of the model. with the light0 and light1 nodes at the front of the mesh.

www.illumina-game.com/jeep.JPG

#1
12/11/2005 (2:55 am)
Hi Ian,

The Torque Lighting Kit handles this - lights are attached to objects in script by calling:

.attachToObject();

The light determines the mount point and offset (both position and rotation) based on the
datablock members MountPoint, MountPosition, and MountRotation.

So just create two datablocks, one for light0 and one for light1, and attach both lights to the car.

If you have any other questions on how this works just pop over to the TLK forum.

-John
#2
12/11/2005 (4:43 am)
Thanks for the quick response John :)

can we attach volume lights as well ?