Update Fog Desnity In Realtime
by Greg G · in Torque 3D Professional · 10/14/2012 (3:52 pm) · 9 replies
Hi,
I'm trying to update the fog desnity in real time.
I tried setting the variable in the console like so:
theLevelInfo.fogDesnity = 1;
But that didn't seam to do anything.
Does anyone have an idea about how I might go about doing this?
I'm trying to update the fog desnity in real time.
I tried setting the variable in the console like so:
theLevelInfo.fogDesnity = 1;
But that didn't seam to do anything.
Does anyone have an idea about how I might go about doing this?
#2
10/14/2012 (5:16 pm)
Thanks for trying, just fyi there are several aspects of mission file that I need to update in real time. Im' look for a general way to do this not just fog desnity.
#3
theLevelInfo.fogDesnity = 1;
should be:
theLevelInfo.fogDensity = 1;
10/14/2012 (5:19 pm)
Is this a case of simple misspelling? theLevelInfo.fogDesnity = 1;
should be:
theLevelInfo.fogDensity = 1;
#4
10/14/2012 (5:54 pm)
Oops yeah it wasn't the misspelling, that was just a typo in this post. Correct spelling doesn't work either.
#5
I haven't got time to actually look this up for you, but here's a question: are you updating fogDensity on the server or client? If you're updating the member on the server, then I reckon the changes aren't being sent to the client. And it's the client who will actually use fogDensity to render the fog.
Most objects resend all their networked fields when they're modified in the editor, but this doesn't necessarily happen when you use scripts to modify these values.
10/14/2012 (10:59 pm)
Okay, so we know that fog density updating works in the editor, right? We don't need to close the game and open it again to view these changes, so there must be a way to do it during gameplay.I haven't got time to actually look this up for you, but here's a question: are you updating fogDensity on the server or client? If you're updating the member on the server, then I reckon the changes aren't being sent to the client. And it's the client who will actually use fogDensity to render the fog.
Most objects resend all their networked fields when they're modified in the editor, but this doesn't necessarily happen when you use scripts to modify these values.
#6
Pardon me, but if I have to put up with programmer art, you lot can adjust to my artist speak. :P
I'm sure you can understand where I'm coming from, though.
10/14/2012 (11:15 pm)
Wouldn't a variable that's updated per tick do this? How does one do the thing with the per tick jobbie?Pardon me, but if I have to put up with programmer art, you lot can adjust to my artist speak. :P
I'm sure you can understand where I'm coming from, though.
#8
10/15/2012 (4:45 am)
That worked! thanks
#9
10/15/2012 (4:58 pm)
Dude - I was thinking about that resource as I was reading this... lol - Thanks Mike!
Torque Owner Robert Fritzen
Phantom Games Development
*EDIT*
The only remaining storm methods I could find were all precipitation related, someone else is going to have to jump in here for this one, sorry.