mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00: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.
This commit is contained in:
@@ -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