Godot version:
v3.0.2.stable.official
OS/device including version:
Windows 10 x64 (v1709)
Issue description:
The mouse snapping in the 3D viewport when holding right click feels very awkward and unnatural, as well as it snaps your view erratically when you right click and drag around immediately.
If it's going to lock the mouse at all I think it shouldn't allow the viewport view to move until the mouse is locked, or the mouse lock should just be an option as Unity and UE4 both don't (at least, not in the same way) lock the mouse in such a way.
At least in Unity (UE4 is similar but I can't speak for it as well) the mouse isn't locked or hidden at all, and when going off the monitor it simply wraps around (the wrapping around is minor, but just presumably how they deal with unlocked mouse) - to me this feels great, and super natrual. Even aside from the snapping/awkwardness, just having the cursor reset to the center after moving the viewport even a little feels very unnatrual too.
Youtube video of Godot's behavior vs Unity
It isn't _super clear_ in the video alone, but I think it's still visible how much smoother unity's viewport is, and it just feels better to have the mouse visible and unlocked, as well as it doesn't have any jerky or "flicky" movement when grabbing the viewport quickly
imo, the editor would be one huge step forward in usability and smoothness if either the snappiness and awkwardness could be somehow fixed, or if there could be a setting to just make it behave more like other similiar programs
Steps to reproduce:
Open any project
Right click near the edge of a viewport and while you right click start dragging to move the camera
The view will snap in an awkward way that doesn't match your input, presumably due to mouse/cursor locking
Minimal reproduction project:
N/A (happens on an empty scene)
There are existing issues that affect free look.
In theory the fact it is locked shouldn't cause problems you describe, however:
It jumps off when doing repeated drags due to bad events handling at OS level (#14463),
Sometimes it stays locked, because the viewport sometimes doesn't receive RMB release event (#14373),
The mouse is currently locked because the editor's mouse warping function doesn't work if only RMB is pressed... (#12497)
Finally, movements seems rough/laggy for several possibilities: Windows + some nVidia graphics card have lag when bumping up the clocks (#11030) which I experience every day, sensitivity is higher than Unity, Godot uses pixels rather than raw mouse input (#7994).
Freelook would be much nicer to use if those issues were adressed.
Basically if you want a reference for this use of RMB, it was really inspired from Unity3D, and is was intented to work the same.
But the bugs I described make it annoying to use...
The mouse behavior when panning (middle mouse clicking) in the 2D viewport actually feels really nice (and works how you might expect, coming from another engine with 2D modes), and I'd love to see something similiar for the 3D viewport (as in, no mouse hiding/snapping to center, wrapping around the edges, etc, this all works great already in the 2D viewport and feels great to me)
It has to wrap around though, because your desktop size can be smaller than the amount you have to drag... unless we use raw mouse input events, in which case the pixel position of the cursor won't matter. It requires implementation on every OS though.
You might be misunderstanding me, the wrap around is fine and feels good, like the 2D viewport and other engines like Unity which have wrap around and don't snap the cursor, that feels good - my problem is just with Godot's 3D viewport, where it locks your mouse to the center and this causes a ton of weird issues that make the freelook mode just feel very snappy and awkward
Sorry for bumping this issue, i can see it has been added to 3.1 witch is nice.
I would just like to say that i too would like to see the mouse "reappear" at the same position when you first clicked RMB, because rightclicking and rotating something and then have the mouse reappear in the center of screen is annoying
this MAY be fixed now with the switch to rawinput on Windows, so please test
The 3D inspector now feels a lot more responsive and I'm unable to reproduce the weird snapping/"warping" I felt before, in this regard it feels super super good now 馃憤
I'm still not a massive fan of the mouse locking to the center - this can get a bit annoying when playing with stuff in the inspector, quickly moving the mouse to the side of the viewport and moving, but then the mouse snaps into the center, further away from the inspector and just not where you expect it, it'd be cool if this could be an option, with the other setting being the "warp around" and visible cursor like in the 2D viewport - but otherwise this fixes the main point of the issue 馃憤
Closing as fixed then.
For the remaining point described in https://github.com/godotengine/godot/issues/18597#issuecomment-419483517, it might be better to open a new issue to discuss this specifically.
Most helpful comment
Sorry for bumping this issue, i can see it has been added to 3.1 witch is nice.
I would just like to say that i too would like to see the mouse "reappear" at the same position when you first clicked RMB, because rightclicking and rotating something and then have the mouse reappear in the center of screen is annoying