Godot Version
v4.4.1 stable
Question
I am trying to use the warp_mouse() method to move the mouse to a specific position on the screen.
Input.warp_mouse(Vector2(get_viewport().get_visible_rect().size.x*(cursor_position.x/960.0),get_viewport().get_visible_rect().size.y*(cursor_position.y/540.0)))
This works well in fullscreen and when not maximized, but breaks when it is maximized due to the black bars at the sides of the screen that appear due to the difference in resolution. Is there a method to get the size of the viewport based on how large the screen is, or to get the scale factor of the viewport?