Lock mouse position while moving camera around?

I want to lock cursor position on viewport when player presses right moust button down, during which he can drag the camera around an object.

I have been able to do this via storing the mouse position to a variable when pressing right mouse button, and with mouse X/Y movements use “Set Mouse Position” to the variable created.
This kind of works, but unfortunately makes the cursor jiggle every frame, making it irritating to watch. This is because cursor is obviously setting its position twice every frame, once when moved and right after via my blueprint command.

I do not want to turn the cursor off, since having a “dragged hand” cursor works much better here than invisible cursor.

Just an idea, why not hiding the cursor and add a widget instead?

Ah, hide the cursor, and create an widget with the cursor graphic to the spot…well that sounds simple and good!

Hah, the idea worked wonderfully, and I could also easily implement good transition animations to the mouse cursor change etc via this method, so thanks for the idea!

Unfortunately… Locking the position actually didnt work as well in reality, it has problems I didnt foresee; when the cursor is locked to your position, but you use the mouse to rotate around the object, you will eventually stop rotation when cursor reaches x or y axis end of the viewport. Having the cursor move among the dragging and rotation gives the user intuition to move his hand back and forth a bit too “to reset” the mouse position. Without this intuition, the usability is not as good. :smiley: I tried resetting the “hidden” mouse cursors screen position so that it would move without stopping at x and y edges, but still mixed feelings about the intuition of it.

Well, this is part of developing things, have an idea, and see that it doesnt work. Luckily didnt take much of time to learn this faulty mechanic.