fix: leaving wall stops wall hugging
This commit is contained in:
@ -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 ////////
|
||||
///////////////////////////
|
||||
|
Reference in New Issue
Block a user