diff --git a/.gitignore b/.gitignore index 36e8488..c3103c2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,7 @@ # Godot-specific ignores .import/ +/builds + # Imported translations (automatically generated from CSV files) *.translation \ No newline at end of file diff --git a/export_presets.cfg b/export_presets.cfg index c06a781..2d9282c 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -58,7 +58,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="./Movement tests.exe" +export_path="builds/Movement tests.exe" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" diff --git a/player_controller/PlayerController.tscn b/player_controller/PlayerController.tscn index 41ac600..0d56190 100644 --- a/player_controller/PlayerController.tscn +++ b/player_controller/PlayerController.tscn @@ -330,6 +330,12 @@ to = NodePath("../../JumpFromWall") event = &"jump" delay_in_seconds = "0.0" +[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/Airborne/WallHugging"] +script = ExtResource("28_n7qhm") +to = NodePath("../../Falling") +event = &"start_falling" +delay_in_seconds = "0.0" + [node name="CoyoteEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"] script = ExtResource("27_34snm") diff --git a/player_controller/Scripts/PlayerController.cs b/player_controller/Scripts/PlayerController.cs index 46f4f1f..ea76b3e 100644 --- a/player_controller/Scripts/PlayerController.cs +++ b/player_controller/Scripts/PlayerController.cs @@ -181,6 +181,8 @@ public partial class PlayerController : CharacterBody3D _grounded.StatePhysicsProcessing += HandleGrounded; _airborne.StatePhysicsProcessing += HandleAirborne; + _wallHugging.StatePhysicsProcessing += HandleWallHugging; + _coyoteEnabled.StateEntered += StartCoyoteTime; _coyoteTimer.Timeout += CoyoteExpired; _jump.StateEntered += Jump; @@ -383,6 +385,12 @@ public partial class PlayerController : CharacterBody3D _playerState.SendEvent("wall_hug"); } + public void HandleWallHugging(float delta) + { + if (!WallHugSystem.IsWallHugging()) + _playerState.SendEvent("start_falling"); + } + /////////////////////////// // Stateless logic //////// /////////////////////////// diff --git a/project.godot b/project.godot index c6f9aee..2fb8723 100644 --- a/project.godot +++ b/project.godot @@ -23,6 +23,11 @@ config/icon="res://icon.svg" GUIDE="*res://addons/guide/guide.gd" +[display] + +window/size/viewport_width=1980 +window/size/viewport_height=1080 + [dotnet] project/assembly_name="Movement tests"