upside down movement inversion

Hey I need some help I’m trying to create some sort of Zero Gravity fighter game
I’ve run into the problem of when character is upside down the mouse is inverted
is there a way I could re-invert when upsideDown???
basically creating rotation relative to Character oppose to relative to vertical??