How to create a virtual mouse in Godot using InputEventMouseMotion.relative?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Taob

Hi!
I am trying to create a virtual mouse (a mouse within the game). I am doing this so that the player has more precision when aiming because the camera’s position will always be between the player and the mouse. In Unity, I did something similar, used the delta of the mouse movement to move the virtual mouse and tried to replicate it in Godot. However, when using “relative” (which I think is the same as delta in Unity) from “InputEventMouseMotion”, it is never (0,0) as the documentation says, but sometimes it is even more than (0,0) and the virtual mouse is always moving. Any recommendation on how to solve this? Thank you!