summaryrefslogtreecommitdiffstats
path: root/scene/3d/physics
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/physics')
-rw-r--r--scene/3d/physics/character_body_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/physics/character_body_3d.cpp b/scene/3d/physics/character_body_3d.cpp
index b13c279234..dda3ea9cca 100644
--- a/scene/3d/physics/character_body_3d.cpp
+++ b/scene/3d/physics/character_body_3d.cpp
@@ -232,7 +232,7 @@ void CharacterBody3D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo
} else {
// Travel is too high to be safely canceled, we take it into account.
result.travel = result.travel.slide(up_direction);
- motion = motion.normalized() * result.travel.length();
+ motion = result.remainder;
}
set_global_transform(gt);
// Determines if you are on the ground, and limits the possibility of climbing on the walls because of the approximations.