How brihernandez/mouseflight works
Mouse Flight is a Unity aircraft-control component and demo. The principal workflow is that a player points with the mouse, the controller derives a world-space aim position, and the aircraft implementation steers toward it; the HUD can display that aim and the aircraft’s boresight. The rig separates mouse-driven pointing from smooth camera motion. No source excerpts were provided, so the relationships below are limited to those documented in the README.
Main entry points: MouseFlightController.cs Flight Controller · MouseFlightRig.prefab Camera Rig · Plane.cs Demo Plane Logic · Hud.cs Demo HUD
Components 10
Mouse Control
- Flight Controller
Assets/MouseFlight/Scripts/MouseFlightController.cs - Aircraft Reference
Assets/MouseFlight/Prefabs/MouseFlightRig.prefab
Camera Rig
- Mouse Aim
Assets/MouseFlight/Prefabs/MouseFlightRig.prefab - Camera Rig
Assets/MouseFlight/Prefabs/MouseFlightRig.prefab - Camera
Assets/MouseFlight/Prefabs/MouseFlightRig.prefab
Aircraft Demo
- Demo Plane Logic
Assets/MouseFlight/Demo/Scripts/Plane.cs - Plane Prefab
Assets/MouseFlight/Demo/Prefabs/Plane.prefab - Demo HUD
Assets/MouseFlight/Demo/Scripts/Hud.cs - HUD Prefab
Assets/MouseFlight/Demo/Prefabs/MouseFlightHud.prefab
Other components
- Player
Connections 10
- Player → Flight Controller: points with mouse
README.md - Player → Flight Controller: uses overrides
README.md - Flight Controller → Mouse Aim: rotates
README.md - Camera → Mouse Aim: orients relative
README.md - Flight Controller → Camera Rig: aims camera
README.md - Camera Rig → Camera: smoothly rotates
README.md - Flight Controller → Aircraft Reference: follows reference
README.md - Flight Controller → Demo Plane Logic: provides aim position
README.md - Demo Plane Logic → Aircraft Reference: steers toward aim
README.md - Flight Controller → Demo HUD: provides aim and boresight
README.md