summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-02-16 11:19:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-02-16 11:19:47 -0300
commitc54330c6b0530d0fdc836f7349c4725eb7f309cb (patch)
tree8a159b2191f315445f7acdfb83d5fff01043a27e /scene/3d
parentf439b786ea4b317c7e30a978e1b61a9578f1f483 (diff)
Make sure stop on slope can have a tiny bit of precision edge.
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/physics_body.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 50abbd483a..980eac7778 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -1222,7 +1222,7 @@ Vector3 KinematicBody::move_and_slide(const Vector3 &p_linear_velocity, const Ve
floor_velocity = collision.collider_vel;
if (p_stop_on_slope) {
- if (Vector3() == lv_n + p_floor_direction) {
+ if ((lv_n + p_floor_direction).length() < 0.01) {
Transform gt = get_global_transform();
gt.origin -= collision.travel;
set_global_transform(gt);