Merge pull request #51556 from fabriceci/fix-move-and-slide-regression-multiple-collision-3x

[3.x] Fix move and slide regression by allowing multiple collision direction
This commit is contained in:
Rémi Verschelde 2021-08-12 20:37:48 +02:00 committed by GitHub
commit e2e34812fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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