Original Post
I'm making a 3D space combat demo, and I want to mimic Freelancer's mouse-driven control scheme. If you aren't familiar with it: you hold down a mouse button while your cursor moves freely around the screen, and the nose of your ship "follows" it. A spring camera keeps the ship within the boundaries of the screen.
To do this, I use the normalized X/Y mouse controls to scale rotations around the ship's X/Y axes. This more or less works, but I get unintended rolling that makes the controls unintuitive.
The part I'm having trouble with is managing the ship's roll. While I have explicit roll controls, I'd like for beginners to not have to use them, and have the ship's roll managed for them. When the player moves their mouse to the right edge of the screen, the ship should roll say 30 degrees and then rotate around its starting Up vector. Also, when a player shops steering (lets go of the mouse button), the ship should roll back to it's starting Up vector.
Does anyone have any info on this?
To do this, I use the normalized X/Y mouse controls to scale rotations around the ship's X/Y axes. This more or less works, but I get unintended rolling that makes the controls unintuitive.
The part I'm having trouble with is managing the ship's roll. While I have explicit roll controls, I'd like for beginners to not have to use them, and have the ship's roll managed for them. When the player moves their mouse to the right edge of the screen, the ship should roll say 30 degrees and then rotate around its starting Up vector. Also, when a player shops steering (lets go of the mouse button), the ship should roll back to it's starting Up vector.
Does anyone have any info on this?