Files
godot-docs/tutorials/physics
videlanicolas 926991cb4c Update 'velocity' with move_and_slide
`move_and_slide` returns the modified velocity, which should be updated in the code. If this is not done, `velocity` will keep increasing due to `velocity.y += delta * gravity`. If one adds a `jump` function to this code it'll not be able to jump, since the vector continues to increase in magnitude and never stops.

By updating the velocity with `move_and_slide` we make sure velocity is 0 when there's no movement, thus reflecting the actual velocity of the object.
2022-10-09 18:17:31 -07:00
..
2019-08-26 18:12:25 -07:00
2022-05-05 11:39:48 +01:00