Caleb Posted March 3, 2016 Share Posted March 3, 2016 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::animate":output = (value1 + (keyFrameFrom * valueRange)) * initialValue;and,output = (value1 + ((keyFrameFrom + keyFrameLerp) * valueRange)) * initialValue;become:output = value1 + ( keyFrameFrom * valueRange );andoutput = value1 + ( ( 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! Quote Link to comment Share on other sites More sharing options...
Azaezel Posted March 3, 2016 Share Posted March 3, 2016 quick check of https://github.com/GarageGames/Torque3D/commits/2044b2691e1a29fa65d1bdd163f0d834995433ce/Engine/source/T3D/lightAnimData.cpp nets ushttps://github.com/GarageGames/Torque3D/commit/6e1d031ecd8eb184baf3a7be50b39d85bb45d8e4#diff-1c0ab75597495d69b8fed03c50c0debaso pretty much per-objectinstance scaling there. Quote Link to comment Share on other sites More sharing options...
Caleb Posted March 6, 2016 Author Share Posted March 6, 2016 Okay cool, thanks for the information! As long as I'm not breaking anything. . . well anything important. ;) Quote Link to comment Share on other sites More sharing options...
Azaezel Posted March 6, 2016 Share Posted March 6, 2016 https://github.com/GarageGames/Torque3D/blob/6e1d031ecd8eb184baf3a7be50b39d85bb45d8e4/Engine/source/T3D/lightAnimData.cpp#L287-L288 sems to be the root issue. think maybe a secondary template method, or pass along an inherit bool? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.