I have a cockpit view system set up for the OV-10 sim that uses a 2D forward 
view and 3D side views (screenshot : 

        http://home.comcast.net/~davidculp2/2D_3D_views.jpg

It's controlled by some nasal scripts I bound to the arrow keys.  Here are the 
up(forward) and left bindings:

 <key n="356">
  <name>Left arrow</name>
  <desc>Look left.</desc>
  <binding>
  <command>nasal</command>
  <script>
    node = props.globals.getNode("/sim/current-view");
    if(node.getChild("view-number").getValue() == "0") { 
       setprop("/sim/current-view/heading-offset-deg", 
                getprop("/sim/view/config/left-direction-deg"));
       node.getChild("internal").setBoolValue(1);
       node.getChild("x-offset-m").setDoubleValue(0.0);
       node.getChild("y-offset-m").setDoubleValue(1.1);
       node.getChild("z-offset-m").setDoubleValue(-1.25);
       node.getChild("pitch-offset-deg").setDoubleValue(0.0);
    }
   </script>
   </binding>
 </key>

 <key n="357">
  <name>Up arrow</name>
   <desc>Look forward.</desc>
  <binding>
  <command>nasal</command>
  <script>
    node = props.globals.getNode("/sim/current-view");
    if(node.getChild("view-number").getValue() == "0") { 
       setprop("/sim/current-view/heading-offset-deg", 
                getprop("/sim/view/config/front-direction-deg"));
       node.getChild("internal").setBoolValue(0);
       node.getChild("x-offset-m").setDoubleValue(0.0);
       node.getChild("y-offset-m").setDoubleValue(0.0);
       node.getChild("z-offset-m").setDoubleValue(0.0);
       node.getChild("pitch-offset-deg").setDoubleValue(-10.0);
    }
   </script>
   </binding>
 </key>


It works fine on the ground, but about 10 seconds after takeoff the 3D side 
views of the aircraft's engine/wing go away and never come back.  I check 
through the property browser and all the values look unchanged.  It seems 
like the "internal" boolean value must have changed, but the property browser 
does not indicate a change (even after a refresh of course).

Any idea what causes the view to change by itself after takeoff?

Thanks,

Dave

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to