Game Development Community

Light flares on Projectiles?

by Daniel Buckmaster · in Torque 3D Professional · 05/22/2012 (3:37 pm) · 2 replies

I've managed to get my projectile to glow with a LightDescription, but the flareType in the LightDescription doesn't seem to be used at all on the projectile.

datablock LightDescription(BoomRocketLight)
{
   color = "1 1 1 1";
   brightness = "1";
   range = 50;
   flareType = LightFlareExample0;
   flareScale = "1";
};

datablock ProjectileData(BoomRocket)
{
   isBallistic = false;
   projectileShapeName = "core/art/shapes/noshape.dts";
   lightDesc = BoomRocketLight;
   velInheritFactor = 1;
};

Using T3D 1.1 final.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
05/22/2012 (4:28 pm)
I recall a repo commit comment a long time ago about disabling the flare for projectiles, I just don't remember the reason why...

Looking at Projectile::prepRenderImage() you can see where the flare info and subsequent call to prepRender() for the flare is commented out. You could try un-commenting it to see if that gets it going again.
#2
05/23/2012 (3:40 am)
Hmm, that code refers to Projectile::mFlareData, which doesn't otherwise seem to exist. However, it does call LightDescription::prepRender, which basically only handles flares.

For now, I've solved it by just mounting a PointLight on the projectile.