Просмотр исходного кода

Added note for the captured mouse mode scenario.

See https://github.com/godotengine/godot/issues/24363#issuecomment-450574818
Asheraryam 6 лет назад
Родитель
Сommit
d3e485f006
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      tutorials/inputs/mouse_and_input_coordinates.rst

+ 2 - 0
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
  .. code-tab:: csharp
 
 
     GetViewport().GetMousePosition();
     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.