Merge pull request #50909 from fabriceci/fix-multiple-direction-collision-3x

[3.x] Allow multiple collision direction at the same time
This commit is contained in:
Rémi Verschelde 2021-07-27 19:10:52 +02:00 committed by GitHub
commit 56d7de2208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1249,9 +1249,6 @@ Vector2 KinematicBody2D::move_and_slide_with_snap(const Vector2 &p_linear_veloci
}
void KinematicBody2D::_set_collision_direction(const Collision &p_collision, const Vector2 &p_up_direction, float p_floor_max_angle) {
on_floor = false;
on_ceiling = false;
on_wall = false;
if (p_up_direction == Vector2()) {
//all is a wall
on_wall = true;