diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-04-24 11:25:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 11:25:08 +0200 |
commit | 8032dd18dd41b2e07e2fd055d6ea9900859fc892 (patch) | |
tree | 4c479e2da6586e7228c585c8e7d8bb108b2f0d26 | |
parent | 05d35bb156190bb4311f689e1e6d2062c2812852 (diff) | |
parent | 0a4dde93d4ae5b83b8cea280a7711c7469de1686 (diff) |
Merge pull request #8408 from 20kdc/bugfix-kine-mas
Apply is_ceiling/is_wall swap fix to 2D move_and_slide
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index f752cbf6b6..626ea10515 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/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; |