Walk view: Difference between revisions

Jump to navigation Jump to search
don't query same property multiple times; don't use fixed view index numbers, but view names
(New page: {{stub}} ==Easy walk== This is the most easy walk mode: you just walk at the same level (compared to the plane) and you will not fall if you get outside the plane. ===walk.nas=== # view ...)
 
(don't query same property multiple times; don't use fixed view index numbers, but view names)
Line 11: Line 11:
   
   
  var walk_about = func(wa_distance) {
  var walk_about = func(wa_distance) {
  if (getprop("sim/current-view/view-number") == 0 or getprop("sim/current-view/view-number") == 7 or getprop("sim/current-view/view-number") == 8) {
  var i = getprop("sim/current-view/view-number");
if (i == view.indexof("Pilot View") or i == view.indexof("Model View") or i == view.indexof("View 8")) {
  var wa_heading_rad = hViewNode.getValue() * 0.01745329252;
  var wa_heading_rad = hViewNode.getValue() * 0.01745329252;
  var new_x_position = xViewNode.getValue() - (math.cos(wa_heading_rad) * wa_distance);
  var new_x_position = xViewNode.getValue() - (math.cos(wa_heading_rad) * wa_distance);

Navigation menu