Writing Joystick Code: Part 2: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 159: Line 159:
  x is the engine number. First engine is 0.
  x is the engine number. First engine is 0.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
  wingsweep
  Wingsweep
Each aircraft that implements Wingsweep has a specific number of steps between fully forward and fully swept-back.
You set the wingsweep by specifying how many steps the wings must sweep forwards or backwards.
Wingsweep forward NR
  controls.wingSweep(n)
U
Wingsweep backwards NR
  controls.wingSweep(-n)
U
Where n is the number of steps. This means that the number of steps implemented per button press is hard-coded
in your joystick file. You could of course use a modifier for larger (or smaller) steps.
In this case you would have different values of n.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
  weapons
  weapons
224

edits

Navigation menu