Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed using move_and_slide with stop_on_slope stopping too early #24046

Merged
merged 1 commit into from Dec 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion scene/2d/physics_body_2d.cpp
Expand Up @@ -1293,7 +1293,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
if (p_stop_on_slope) {
if (Vector2() == lv_n + p_floor_direction) {
Transform2D gt = get_global_transform();
gt.elements[2] -= collision.travel;
gt.elements[2] -= collision.travel.project(p_floor_direction.tangent());
set_global_transform(gt);
return Vector2();
}
Expand Down