From dd5f01e83e337c3c4ea771052a2075761e2bcef3 Mon Sep 17 00:00:00 2001 From: fabriceci Date: Tue, 28 Sep 2021 16:40:12 +0200 Subject: [PATCH] Set stop on slope on by default on CharacterBody. --- doc/classes/CharacterBody2D.xml | 2 +- doc/classes/CharacterBody3D.xml | 2 +- scene/2d/physics_body_2d.h | 2 +- scene/3d/physics_body_3d.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 6e8d7a2b15e..35702070be8 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -137,7 +137,7 @@ Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. - + If [code]true[/code], the body will not slide on floor's slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index f13796bfe7c..66d9940b608 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -146,7 +146,7 @@ Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. - + If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index ac1a1357f18..42b602db2fe 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -327,8 +327,8 @@ private: real_t margin = 0.08; MotionMode motion_mode = MOTION_MODE_GROUNDED; - bool floor_stop_on_slope = false; bool floor_constant_speed = false; + bool floor_stop_on_slope = true; bool floor_block_on_wall = true; bool slide_on_ceiling = true; int max_slides = 4; diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index 942fcc44c5f..00a51908246 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -364,8 +364,8 @@ private: }; CollisionState collision_state; - bool floor_stop_on_slope = false; bool floor_constant_speed = false; + bool floor_stop_on_slope = true; bool floor_block_on_wall = true; bool slide_on_ceiling = true; int max_slides = 6;