2
0
Эх сурвалжийг харах

Merge pull request #8408 from 20kdc/bugfix-kine-mas

Apply is_ceiling/is_wall swap fix to 2D move_and_slide
Rémi Verschelde 8 жил өмнө
parent
commit
8032dd18dd

+ 1 - 1
scene/2d/physics_body_2d.cpp

@@ -1199,7 +1199,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
 						revert_motion();
 						return Vector2();
 					}
-				} else if (get_collision_normal().dot(-p_floor_direction) <= Math::cos(p_floor_max_angle)) { //ceiling
+				} else if (get_collision_normal().dot(-p_floor_direction) >= Math::cos(p_floor_max_angle)) { //ceiling
 					move_and_slide_on_ceiling = true;
 				} else {
 					move_and_slide_on_wall = true;