From d3e485f00611b3f01c2705e3b9093c6088439bc1 Mon Sep 17 00:00:00 2001 From: Asheraryam Date: Wed, 6 Feb 2019 09:19:51 +0200 Subject: [PATCH] Added note for the captured mouse mode scenario. See https://github.com/godotengine/godot/issues/24363#issuecomment-450574818 --- tutorials/inputs/mouse_and_input_coordinates.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/inputs/mouse_and_input_coordinates.rst b/tutorials/inputs/mouse_and_input_coordinates.rst index 866c14899..9eb34e84d 100644 --- a/tutorials/inputs/mouse_and_input_coordinates.rst +++ b/tutorials/inputs/mouse_and_input_coordinates.rst @@ -62,3 +62,5 @@ Alternatively, it's possible to ask the viewport for the mouse position: .. code-tab:: csharp GetViewport().GetMousePosition(); + +.. note:: When the mouse mode is set to ``Input.MOUSE_MODE_CAPTURED``, the ``event.position`` value from ``InputEventMouseMotion`` is the center of the screen. Use ``event.relative`` instead of ``event.position`` to process mouse movement and position changes.