No Rotation on Animated Lights

Expanding and utilizing the engine via C++.
4 posts Page 1 of 1
Caleb
Posts: 16
Joined: Tue Feb 10, 2015 5:01 pm
by Caleb » Thu Mar 03, 2016 3:13 pm
I've recently finished porting my code from T3D 3.5 to 3.8, and everything went very smoothly. After running a couple of levels however, I noticed that rotating lights no longer animated. As far as I can tell all other types of animations are fine. It was easy enough to fix by changing two lines in lightAnimData.cpp back to the original (3.5) versions like so:

In "AnimValue<COUNT>::animate":
output[i] = (value1[i] + (keyFrameFrom * valueRange)) * initialValue;

and,
output[i] = (value1[i] + ((keyFrameFrom + keyFrameLerp) * valueRange)) * initialValue;


become:
output[i] = value1[i] + ( keyFrameFrom * valueRange );

and
output[i] = value1[i] + ( ( keyFrameFrom + keyFrameLerp ) * valueRange );


"initialValue" is set to "output" further up. I haven't really done any tests to compare the different results, so my question is what does multiplying by "output" accomplish? Am I missing out in some way by not scaling the individual outputs?
Thanks!
Azaezel
Posts: 390
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Thu Mar 03, 2016 6:40 pm
Caleb
Posts: 16
Joined: Tue Feb 10, 2015 5:01 pm
by Caleb » Sun Mar 06, 2016 3:24 am
Okay cool, thanks for the information! As long as I'm not breaking anything. . . well anything important. ;)
Azaezel
Posts: 390
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Sun Mar 06, 2016 3:40 am
https://github.com/GarageGames/Torque3D ... #L287-L288 sems to be the root issue. think maybe a secondary template method, or pass along an inherit bool?
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests