godotengine / godotengine/godot-docs
Documentation for `move_and_slide()` function in `CharacterBody2D` doesn't specify `delta` is not needed.
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
4.3 Stable
This issue was brought up in a Reddit thread: https://www.reddit.com/r/godot/comments/1fv3d6g/it_bothers_me_how_something_so_important_about/
Simply put, according to here: https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html#move-and-slide `move_and_slide() automatically includes the timestep in its calculation, so you should not multiply the velocity vector by delta. This does not apply to gravity as it is an acceleration and is time dependent, and needs to be scaled by delta.`
However, this is not mentioned in the function documentation, which is probably one of the most important places it should be mentioned: https://docs.godotengine.org/en/stable/classes/class_characterbody2d.html#class-characterbody2d-method-move-and-slide
And it's also not mentioned in the `Using CharacterBody2D/3D` https://docs.godotengine.org/en/stable/tutorials/physics/using_character_body_2d.html#move-and-slide (not the previous section mentions `delta` use for `move_and_collide()`, but not mentioned at all for `move_and_slide()`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.