ExplosionData - turn off lights?
by Danner Jones · in Torque Game Engine · 03/03/2004 (3:37 pm) · 2 replies
I was just noticing that my crossbow bolts give off a yellow light when they explode. I found the code in the script file crossbow.cs that sets the light's properties but I found no "hasLight" property to turn them off.
Looking in the engine it appears that the light is always added to the lightmanager. So if I don't want my projectiles to give off light when they explode, I can set both colors to black or the start/end radius to 0 but that still creats a light and, I'm guessing, must compute lighting when the explosion occurs although it will have no effect.
I can easily add a "hasLight" param to the ExplosionData datablock, but wanted to see if anyone else has noticed this or maybe there's something else I'm missing that makes the question moot :)
-Nerseus
Looking in the engine it appears that the light is always added to the lightmanager. So if I don't want my projectiles to give off light when they explode, I can set both colors to black or the start/end radius to 0 but that still creats a light and, I'm guessing, must compute lighting when the explosion occurs although it will have no effect.
I can easily add a "hasLight" param to the ExplosionData datablock, but wanted to see if anyone else has noticed this or maybe there's something else I'm missing that makes the question moot :)
-Nerseus
#2
03/04/2004 (10:39 am)
Yep, I'm sure. Actually, they both have a light but I've turned it off on the projectile (hasLight=false) - now the light only shows up when the bolt explodes (on my DIF object, the faces highlight yellow).
Torque Owner Davis Ray Sickmon, Jr
Default Studio Name