mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
[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:
committed by
Max Hilbrunner
parent
8eab8f79fc
commit
7df8fe736f
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user