Sun and fxSunLight Not Moving
by Jason Gossiaux · in Torque Game Engine · 11/04/2007 (1:12 pm) · 1 replies
I am noticing these two objects seem to function differently than other shapes and interiors. If I go into the console and type MainSun.elevation = 40;, the sun doesn't automatically move into the new position. I can do a MainSun.dump(); and see the elevation variable was in fact updated, but its not taking effect for some reason.
I thought this could be related to the fxSunLight not being updated to track it, but I went and manually gave that object a new elevation to match, and it failed to update either. The only way I can get the sun to update is in the editor, where I change the numbers via the console and then click on the editor bar. Its like clicking on the editor bar forces the refresh. Unfortunately that's not going to work for the game :P
Is there some method by which I should be calling an update or refresh of these objects when editing their properties? I'm just trying to manipulate the sun a bit while in game so I can test my object by object lightmap creation routines. Thanks!
I thought this could be related to the fxSunLight not being updated to track it, but I went and manually gave that object a new elevation to match, and it failed to update either. The only way I can get the sun to update is in the editor, where I change the numbers via the console and then click on the editor bar. Its like clicking on the editor bar forces the refresh. Unfortunately that's not going to work for the game :P
Is there some method by which I should be calling an update or refresh of these objects when editing their properties? I'm just trying to manipulate the sun a bit while in game so I can test my object by object lightmap creation routines. Thanks!
About the author
Torque Owner Jason Gossiaux
Indie Dev
To repeat this bug please do the following:
1). Run the mission editor and setup the sun as name = MainSun at elevation = 40 and relight.
2). Go to the console and type MainSun.setFieldValue(elevation, -6);
3). Relight, you'll notice the lightmaps don't change.
4). Click on the sun object in the object panel.
5). Relight again, you'll notice the lightmaps change.
Thanks in advance for any help with this. Its been perplexing the heck out of me.