- Messages
- 767
- Country
Hi!.
First of all I would like to thank you again for your usefull help. This site and this forum is like founding a goldmine!
I'm near the last step into creating my first "well made" scenery: adding a good animated windsock is still a problem without vertex animation, but I got decent results.
Now it's time to get it rotating according to wind direction.
So I've made a set of windsocks mdls pointing 0-60-120-180-240-300° (for both low-mid and high speed wind)
I ran MDLTweaker II (what a wonderful tool!) and put wind velocity conditions: ok, they behave quite correctly.
Next step is to add wind heading condition. The little help says I must use 0 to 65535 value for 0 to 360 degrees. But, if I write a number > 32767 in the box the program give me "Overflow" runtime error. (only 16 bit values admitted?)
I tried with negative values (0 to 32767, -32767 to -1) but I'm not sure this is the right way. For example, using the following table, for the 120° mdl I wrote min 16384 and max 27306, and for the 360 (0) mdl I wrote min -5461 and max 5461
Now my windsock is animated, rotates accordingly to the wind, has different model for no wind, low-mid wind and high wind BUT it requires a full restart of FS to see changes... Where is the trick?
First of all I would like to thank you again for your usefull help. This site and this forum is like founding a goldmine!
I'm near the last step into creating my first "well made" scenery: adding a good animated windsock is still a problem without vertex animation, but I got decent results.
Now it's time to get it rotating according to wind direction.
So I've made a set of windsocks mdls pointing 0-60-120-180-240-300° (for both low-mid and high speed wind)
I ran MDLTweaker II (what a wonderful tool!) and put wind velocity conditions: ok, they behave quite correctly.
Next step is to add wind heading condition. The little help says I must use 0 to 65535 value for 0 to 360 degrees. But, if I write a number > 32767 in the box the program give me "Overflow" runtime error. (only 16 bit values admitted?)
I tried with negative values (0 to 32767, -32767 to -1) but I'm not sure this is the right way. For example, using the following table, for the 120° mdl I wrote min 16384 and max 27306, and for the 360 (0) mdl I wrote min -5461 and max 5461
Code:
Values are obtained using the formula (Degree * 65535)/360
Value' is the "should be" range from 0 to 65535
Value'' are range from -32767 to 32767
Degrees Value' Value''
0 - -
30 5461 5461
60 - -
90 16384 16384
120 - -
150 27306 27306
180 - -
210 38229 -27306
240 - -
270 49151 -16384
300 - -
330 60074 -5461
360 - -
Now my windsock is animated, rotates accordingly to the wind, has different model for no wind, low-mid wind and high wind BUT it requires a full restart of FS to see changes... Where is the trick?