[Manual] Clarify use of delta with move_and_slide

Added details to clarify that while `velocity` should not be multiplied
by `delta`, `gravity` still should.

(cherry picked from commit c6bf5d4c28)
This commit is contained in:
A Thousand Ships
2024-03-06 12:34:19 +01:00
committed by Max Hilbrunner
parent 8eab8f79fc
commit 7df8fe736f

View File

@@ -429,7 +429,9 @@ without writing much code.
.. warning:: ``move_and_slide()`` automatically includes the timestep in its
calculation, so you should **not** multiply the velocity vector
by ``delta``.
by ``delta``. This does **not** apply to ``gravity`` as it is an
acceleration and is time dependent, and needs to be scaled by
``delta``.
For example, use the following code to make a character that can walk along
the ground (including slopes) and jump when standing on the ground: