Fix KinematicBody::move_and_slide

This commit is contained in:
Demiu 2019-07-15 01:59:18 +02:00 committed by GitHub
parent 803544052a
commit 81f62d68c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}