Changed clamp code to be the same as in the demo sample

This commit is contained in:
Niklas
2023-07-16 18:23:16 +02:00
parent b3214b14c2
commit 3acdc258c0
@@ -297,8 +297,7 @@ the ``_process`` function (make sure it's not indented under the `else`):
.. code-tab:: gdscript GDScript
position += velocity * delta
position.x = clamp(position.x, 0, screen_size.x)
position.y = clamp(position.y, 0, screen_size.y)
position = position.clamp(Vector2.ZERO, screen_size)
.. code-tab:: csharp