Game Development Community

Attach light to animated DTS...

by Tobias Niva · in Torque Game Engine Advanced · 09/30/2007 (7:28 pm) · 2 replies

Hi.

I'm a little bit confused...
Trying to add a light-source to my swinging lamp (much like the old Synapse-demo).

I can attach my light with the "attachToObject" but it sticks to the objects "root" - and not following the animation.

I tried to put in a "mount0"-dummy as well as a "light0" one (that follows the swing in my Max-file...) but the light is still not moving when attached later.

According to this at TDN...
http://tdn.garagegames.com/wiki/Torque/LightingSystem/Lighting_Effects
...I'm not supposed to add any "mount-objects" - the light should just be "attached"...

I fuzzled around with the "MountPoint, MountPosition, and MountRotation"...but with those I can just change where the light "is" when attached...still not moving.

Any tips on this? Obviously not a coder as you probably understand...merely a frustrated graphics artist.

Work with TGEA 1.0.2.

#1
10/01/2007 (10:49 am)
Make sure the light datablock member "MountPoint" is assigned the object's mount point (by name) and that the mount point moves with the animation.
#2
10/01/2007 (4:10 pm)
Thank you John!
Got it working.