Skip to content

Commit

Permalink
adjust min stop to horizontal velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Nov 9, 2017
1 parent 0416ca2 commit 9e6f974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/3d/physics_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ Vector3 KinematicBody::move_and_slide(const Vector3 &p_linear_velocity, const Ve
Transform gt = get_global_transform();
gt.origin -= collision.travel;
set_global_transform(gt);
return Vector3();
return floor_velocity;
}
} else if (collision.normal.dot(-p_floor_direction) >= Math::cos(p_floor_max_angle)) { //ceiling
on_ceiling = true;
Expand Down

0 comments on commit 9e6f974

Please sign in to comment.