From afb22f1bb72d7a1f0e53a79b3ca0e8ed5cd5a237 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Mon, 27 May 2024 21:43:52 +0200 Subject: [PATCH] Fix mixup between `translated` and `translated_local` --- tutorials/math/matrices_and_transforms.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tutorials/math/matrices_and_transforms.rst b/tutorials/math/matrices_and_transforms.rst index 8d8bff775..05f4c0dd8 100644 --- a/tutorials/math/matrices_and_transforms.rst +++ b/tutorials/math/matrices_and_transforms.rst @@ -222,11 +222,12 @@ to set its ``origin`` vector to (1, 2): .. image:: img/matrices_and_transforms/translate.png -There is also a ``translated()`` method, which performs a different -operation to adding or changing ``origin`` directly. The ``translated()`` +There is also a ``translated_local()`` method, which performs a different +operation to adding or changing ``origin`` directly. The ``translated_local()`` method will translate the object *relative to its own rotation*. For example, an object rotated 90 degrees clockwise will move to -the right when ``translated()`` with ``Vector2.UP``. +the right when ``translated_local()`` with ``Vector2.UP``. To translate +*relative to the global/parent frame* use ``translated()`` instead. .. note:: Godot's 2D uses coordinates based on pixels, so in actual projects you will want to translate by hundreds of units.