Aircraft Input Manager

Manages aircraft input by retrieving data from active input providers and filling the input states struct with the fetched data.
Purpose and Role
The AircraftInputManager is responsible for bridging the gap between user input and the aircraft's control systems. It continuously retrieves input from scene-level input providers (such as keyboard, gamepad, or custom input sources) and populates the AircraftInputStates struct with the current input values. This input data is then used by various aircraft systems like control surfaces, engines, and flight instruments.
The component supports both automatic input retrieval from input providers in the scene and manual input setting through scripts, making it suitable for both player-controlled aircraft and AI-controlled systems.
This component is required on every aircraft and must be paired with an AircraftController component.
Key Features
Auto Input Mode
When the Auto Set Input option is enabled (default), the manager automatically retrieves and updates input states from active input providers each frame. This is the normal mode for player-controlled aircraft.
Manual Input Mode
When Auto Set Input is disabled, input states can be set manually through scripting. This is useful for AI controllers, autopilot systems, or testing.
Input States
The manager stores all input data in an AircraftInputStates struct, which includes:
- Control surface inputs (ailerons, elevator, rudder, flaps)
- Trim inputs for various control surfaces
- Throttle and engine controls
- Aircraft system controls (landing gear, lights, landing brakes, etc.)
For detailed information about available input states, see AircraftInputStates.
Scene Requirements
The aircraft's scene must include active input providers to function properly:
- Aircraft Input Providers: Provide aircraft-specific controls (throttle, ailerons, elevator, etc.)
- Scene Input Providers: Handle general scene controls (camera, vehicle switching, GUI toggling)
Multiple input providers can be present simultaneously; numeric inputs are summed while boolean inputs use logical OR. For more details, see the Input System documentation.
Configuration
Auto Set Input
Enable this option to automatically retrieve input from input providers. Disable for manual input control through scripts.
Input States
The current input state struct. When Auto Set Input is disabled, you can modify these values directly through the inspector or through scripts for AI control.