From 52ebc68a026bd830c71471c247fa3d318a7f62d9 Mon Sep 17 00:00:00 2001 From: Minimata Date: Thu, 5 Feb 2026 17:04:45 +0100 Subject: [PATCH] put the player back in its place --- maps/levels/tuto_movement.tscn | 2 +- .../main_menu/main_menu_with_animations.tscn | 2 +- .../player_controller/scripts/PlayerController.cs | 15 ++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/maps/levels/tuto_movement.tscn b/maps/levels/tuto_movement.tscn index 5f70e563..190fc817 100644 --- a/maps/levels/tuto_movement.tscn +++ b/maps/levels/tuto_movement.tscn @@ -13,7 +13,7 @@ transform = Transform3D(-0.1772511, 0.44628847, 0.87715954, 0.49540228, -0.72966087, 0.4713508, 0.85038733, 0.51809436, -0.09175911, 0, 0, 0) [node name="Player" parent="." index="6" unique_id=1309399929] -transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -16, 22.91025, -51.458496) +transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -0.5, 0.4102497, 0.5415039) HasSword = false HasParry = false diff --git a/menus/scenes/menus/main_menu/main_menu_with_animations.tscn b/menus/scenes/menus/main_menu/main_menu_with_animations.tscn index 191dc3e5..407363a9 100644 --- a/menus/scenes/menus/main_menu/main_menu_with_animations.tscn +++ b/menus/scenes/menus/main_menu/main_menu_with_animations.tscn @@ -354,7 +354,7 @@ graph_offset = Vector2(-180.277, 49) [node name="MainMenu" unique_id=766584506 instance=ExtResource("1_my8ii")] script = ExtResource("2_nyjay") level_select_packed_scene = ExtResource("3_8i6b8") -game_scene_path = "uid://bx3cd2hoaok3k" +game_scene_path = "uid://bd0d7gvinx35c" menu_context = ExtResource("3_ytpwg") back_action = ExtResource("4_8i6b8") diff --git a/scenes/player_controller/scripts/PlayerController.cs b/scenes/player_controller/scripts/PlayerController.cs index ff0eaa5e..f1cc5d7b 100644 --- a/scenes/player_controller/scripts/PlayerController.cs +++ b/scenes/player_controller/scripts/PlayerController.cs @@ -869,7 +869,8 @@ public partial class PlayerController : CharacterBody3D, var haveEnoughSpeed = hvelProjected.Length() > WallRunSpeedThreshold; var isCoplanarEnough = Velocity.AngleTo(wallNormal) > Math.PI/4 && Velocity.AngleTo(wallNormal) < 3*Math.PI/4; var isGoingDownwards = Velocity.AngleTo(Vector3.Down) < Math.PI/4; - return haveEnoughSpeed && isCoplanarEnough && !isGoingDownwards && isIndeedWall && !_coyoteEnabled.Active; + var shouldStart = haveEnoughSpeed && isCoplanarEnough && !isGoingDownwards && isIndeedWall; + return shouldStart; } public float ComputeVerticalSpeedGravity(float delta) @@ -1300,12 +1301,12 @@ public partial class PlayerController : CharacterBody3D, { if (IsTryingToMantle()) _playerState.SendEvent("mantle"); - if (ShouldStartWallRun() && Velocity.Y < WallRunUpwardVelocity) - { - SetVerticalVelocity(WallRunUpwardVelocity); - _playerState.SendEvent("wall_run"); - return; - } + // if (ShouldStartWallRun() && Velocity.Y < WallRunUpwardVelocity) + // { + // SetVerticalVelocity(WallRunUpwardVelocity); + // _playerState.SendEvent("wall_run"); + // return; + // } // Update horizontal velocity var horizontalVelocity = ComputeHVelocityAir(delta);