Unity mouse trackball? (i guess it is called that) (c#)

This will be a bit hard to explain but i will try.
I played an indie arcade flight sim the other day called “Battle of Endor” and you could easily move your view without moving the mouse too much.

This is because it had a really smart kind of mouse control.

Lets say that your mouse is in the center of the mousepad. Then you move you mouse to the right. The ship would turn to the right until you centered the mouse again. If you moved your mouse slightly to the right, your ship would slighty turn to the right until you move it to the right even more or move your mouse to the center.

Well i hope my explanation was understandable. Now here is the real question; How to achieve this in Unity (specifically in c#) ?

As Unity Answers isn’t here to script for you, I won’t give you ready code.

What you need to do is have a dead zone (a circle few pixels in diameter) where the ship remains centered and stable. As soon as the cursor moves out of this dead zone, you calculate how far it has moved relative to the dead zone and adjust your ship accordingly. You can limit how much the player can maneuver by making a larger circle, that the cursor cannot escape.

You’ll need Screen.showCursor.