Cleanest way to do mouse control with this vehicle

I am making a flight rig, that might end up in Wrectified it might not, but the important part is I am coding python…

I could use some help with mouse control and a system that triggers the control surfaces to move on the plane…

It’s decently entertaining as it is now but needs more realism and detail:)

Q-E = Roll
W-S = Nose up/down
A-D = Taxi / rudder left right

Numpdad 2 -( 2 on my notebook) is throttle up and 2 on a reg notebook - edit added /\ above support
X is throttle down,

Have you checked out the mouse movement script in the game engine resources forum.Look up flight assimulators in the search.

First off I would really recommend reversing the pitch controls- on a standard airplane, nose down is forward on the control stick/wheel (W) and nose up is back (S), it’s very disorienting to fly with reversed controls.

As for mouse control, I’d recommend one of two solutions- the first being very straight forward, moving the mouse directly moves control surfaces (push forward on the mouse and the plane tips down, drag left and the plane banks left, for example) that’s the easiest to set up, as you can just read how far from the center of the screen the cursor is, and multiply the roll and pitch by the X and Y amounts, and then set the cursor back to the center at the end of the frame.

The other option is less realistic as a simulation, but a lot more intuitive for beginners and casual players- have the mouse move a visible cursor around on the screen, project that cursor into 3d space in front of the plane a certain distance, and then have the script calculate and adjust the pitch, roll, and yaw such that the plane will turn to face the cursor. This means the player can use 2 axes of control to guide the plane around, with definite visual feedback and an indicator of where the plane will go in 3d space. For an idea of what this looks like, check out Freelancer (it’s space flight but the principle of the control scheme is pretty much the same)
This is also similar in principle to the Warthog driving in the Halo games, where you point the camera where you want to go and the game adjusts the wheels to turn in that direction.

I’m not going to get into specifics of how to code these just now, but deciding what target control scheme you’re aiming for before you start coding is very helpful.