]> git.mxchange.org Git - flightgear.git/commit
David Culp:
authorehofman <ehofman>
Sun, 22 Aug 2004 16:22:18 +0000 (16:22 +0000)
committerehofman <ehofman>
Sun, 22 Aug 2004 16:22:18 +0000 (16:22 +0000)
commit161912ea4ccf632029b8b6937ce561ecace0ef9f
treeee711da7b3411198b2e58f6bc09257e232d8a604
parent72b201d96ca09e2f583c5180a1741168864b3bf9
David Culp:

Right now the code is not very configurable, and there is only one submodel per airplane possible. It is implemented as an SGSubSystem, just like the electrics, vacuum, etc. systems.  To make it work you need to make a release binding like this (for my joystick trigger):

 <button n="0">
  <desc>Trigger</desc>
  <binding>
   <command>property-assign</command>
   <property>/systems/submodel/trigger</property>
   <value type="bool">true</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/systems/submodel/trigger</property>
    <value type="bool">false</value>
   </binding>
  </mod-up>
 </button>

Then, each airplane that uses the system should have something like this added to its *-set.xml file (note that this does *not* go within the <sim></sim> tags):

 <systems>
   <submodel>
    <serviceable type="bool">true</serviceable>
    <amount type="int">70</amount>
   </submodel>
 </systems>

Future improvements will include:
1)  more configurability, so the user can create multiple submodels, and can assign them different locations, and pitch and yaw adjustments, and nitial velocity.

2) sound?

3) a more accurate calculation of the submodels location at any pitch/roll/yaw.

4) a way to pre-load the model, so the AI code doesn't have to parse the model every time it creates an instance.

I think that's all of it.
src/Systems/Makefile.am
src/Systems/submodel.cxx [new file with mode: 0644]
src/Systems/submodel.hxx [new file with mode: 0644]
src/Systems/system_mgr.cxx