Skip to content

Commit

Permalink
Merge pull request #9060 from AThousandShips/gravity_note
Browse files Browse the repository at this point in the history
[Manual] Clarify use of `delta` with `move_and_slide`
  • Loading branch information
mhilbrunner committed Mar 6, 2024
2 parents 96a2784 + c6bf5d4 commit 1367bdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tutorials/physics/physics_introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1367bdb

Please sign in to comment.