Replace Nasal loop for camera altitude computation by property rule
This commit is contained in:
parent
15f85a6a89
commit
1c9f110192
3 changed files with 12 additions and 5 deletions
|
@ -36,4 +36,13 @@
|
|||
<gain>6303363.70409</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>LocalWeather:eye-altitude</name>
|
||||
<input>
|
||||
<property>/position/altitude-ft</property>
|
||||
</input>
|
||||
<output>/sim/rendering/eye-altitude-m</output>
|
||||
<type>gain</type>
|
||||
<gain>0.30480</gain>
|
||||
</filter>
|
||||
</PropertyList>
|
||||
|
|
|
@ -4570,7 +4570,7 @@ setprop(lw~"effect-volumes/number-active-sat",0);
|
|||
# setprop(lw~"config/max-vis-range-m", 120000.0);
|
||||
setprop(lw~"config/temperature-offset-degc", 0.0);
|
||||
|
||||
setprop("/sim/rendering/eye-altitude-m", getprop("/position/altitude-ft") * ft_to_m);
|
||||
#setprop("/sim/rendering/eye-altitude-m", getprop("/position/altitude-ft") * ft_to_m);
|
||||
|
||||
# create properties for tile management
|
||||
|
||||
|
|
|
@ -122,11 +122,9 @@ time_lw = time_lw + dt_lw;
|
|||
#var terminator_offset = sun_angle / 0.017451 * 110000.0;# + 250000.0;
|
||||
#setprop("/environment/terminator-relative-position-m",terminator_offset);
|
||||
|
||||
var viewpos = geo.viewer_position();
|
||||
|
||||
# var viewpos = geo.viewer_position();
|
||||
# setprop("/environment/alt-in-haze-m", getprop("/environment/ground-haze-thickness-m")-viewpos.alt());
|
||||
|
||||
setprop("/sim/rendering/eye-altitude-m", viewpos.alt());
|
||||
# setprop("/sim/rendering/eye-altitude-m", viewpos.alt());
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue