Board index FlightGear Development New features

Unable to set the y-offset  Topic is solved

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Unable to set the y-offset

Postby Merik » Wed Feb 23, 2011 1:53 am

I'm trying to assign keyboard shortcuts for custom views. I want to use the x-offset-m and y-offset-m properties (described here). The x-offset-m property works as desirable. However, the y-offset-m doesn't. No matter what value I put there (see code below), once I hit the keyboard shortcut, the y-offset becomes zero.

Here is an example code. It should supposedly not move the pilot of a C172p at all in terms of x and y axes (because the original view of the pilot is x = -.21 and y = ). However, if you add this to your keyboard.xml and hit F1, the pilot is pushed down on his seat!

Code: Select all
<key n="257">
  <name>F1</name>
  <desc>Move Pilot to Left</desc>
  <repeatable>false</repeatable>
  <binding>
   <command>property-assign</command>
   <property>/sim/current-view/x-offset-m</property>
   <value type="double">-.21</value>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/sim/current-view/y-offset-m</property>
   <step type="double">0.23</step>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/sim/current-view/field-of-view</property>
   <value type="double">66</value>
  </binding>
 </key>


I would be grateful if one could tell me what I'm doing wrong here.
I'm using FlightGear Git version on a Win 7 machine with an onboard ATI graphic card and 3 GB of RAM.

These are the link I've found useful: Types of AirspeedE6B emulatorAirspaces explained with examples
Merik
 
Posts: 191
Joined: Thu Jan 21, 2010 11:14 am

Re: Unable to set the y-offset  

Postby skyop » Wed Feb 23, 2011 1:57 am

Found it!

Merik wrote: <step type="double">0.23</step>


It should be

Code: Select all
<value type="double">0.23</value>
Aircraft: [ CRJ700-family | DC-10-30 ] Scenery: [ KBFL ]
skyop
 
Posts: 3042
Joined: Mon Jun 14, 2010 12:40 am
Location: Austin, Texas, USA
IRC name: skyop
Version: next
OS: Fedora 23/Windows 10

Re: Unable to set the y-offset

Postby Merik » Wed Feb 23, 2011 2:27 am

Nice catch! Thank you.
I'm using FlightGear Git version on a Win 7 machine with an onboard ATI graphic card and 3 GB of RAM.

These are the link I've found useful: Types of AirspeedE6B emulatorAirspaces explained with examples
Merik
 
Posts: 191
Joined: Thu Jan 21, 2010 11:14 am


Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest

cron