Jump to content

No Rotation on Animated Lights


Caleb

Recommended Posts

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 );

and

output = 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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...