diff options
author | Demiu <miazgapow@gmail.com> | 2019-07-15 01:59:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 01:59:18 +0200 |
commit | 81f62d68c2e2f244671ecfa31e6e12809bfe2f4d (patch) | |
tree | b7a56da623c8091b9c52454e808ab91e0b59e290 /scene/3d/physics_body.cpp | |
parent | 803544052a6d0aca73e7b3c4b7c3a9c5ee9707d8 (diff) |
Fix KinematicBody::move_and_slide
Diffstat (limited to 'scene/3d/physics_body.cpp')
-rw-r--r-- | scene/3d/physics_body.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 2f8b2ecc5c..e60a50d38a 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -1218,7 +1218,7 @@ Vector3 KinematicBody::move_and_slide(const Vector3 &p_linear_velocity, const Ve if (p_stop_on_slope) { if ((lv_n + p_floor_direction).length() < 0.01 && collision.travel.length() < 1) { Transform gt = get_global_transform(); - gt.origin -= collision.travel; + gt.origin -= collision.travel.slide(p_floor_direction); set_global_transform(gt); return Vector3(); } |