diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-11-25 00:10:36 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-12-02 08:35:50 +0100 |
commit | 750f343e4a461c588494bf779b9be7c1be8ebc68 (patch) | |
tree | f2452a56e782df7660528bdd25e09165963390ea /editor/editor_vcs_interface.cpp | |
parent | e64a663c59141f972345852f0bce613e3f13dd3a (diff) |
Ensure move_and_slide() is consistent between the 2D and 3D versions.
In the 3D version:
- Partially revert #20908 that was reverted in the 2D version as part
of #21653. This ensures that the Vector returned is always perpendicular
to the surface collided with; and not the floor_normal Vector passed to
the function when on a floor.
- Include an update of the floor velocity before multiplying by the time
delta, which was added to the 2D version as part of commit 13a8014.
In the 2D version:
- Use the Vector2.slide() function instead of Vector2.tangent() to adjust
the amount of motion the stop_on_slope undoes to ensure that it is in the
right direction. This is a implementation of the 3D approach from #30588.
- Combine the !found_collision and motion == Vector2() checks for break.
- Other minor formating changes to make the functions look identical.
Also renamed some variables to align with their use.
Diffstat (limited to 'editor/editor_vcs_interface.cpp')
0 files changed, 0 insertions, 0 deletions