diff options
author | Demiu <miazgapow@gmail.com> | 2019-07-15 14:09:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 14:09:29 +0200 |
commit | fead4e369a278aebc4730b04776539e31dd17898 (patch) | |
tree | d336ca6abbd03baf1264157b9a6a85d3c6459c8b /scene/3d | |
parent | 81f62d68c2e2f244671ecfa31e6e12809bfe2f4d (diff) |
Change p_stop_on_slope in 3D move_and_slide_with_snap
Diffstat (limited to 'scene/3d')
-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 e60a50d38a..156f115cce 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -1282,7 +1282,7 @@ Vector3 KinematicBody::move_and_slide_with_snap(const Vector3 &p_linear_velocity if (p_stop_on_slope) { // move and collide may stray the object a bit because of pre un-stucking, // so only ensure that motion happens on floor direction in this case. - col.travel = p_floor_direction * p_floor_direction.dot(col.travel); + col.travel = col.travel.project(p_floor_direction); } } else { apply = false; //snapped with floor direction, but did not snap to a floor, do not snap. |