made it that inputting a direction when hanging makes us leave the wall
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Test (push) Successful in 7m25s
Create tag and build when new code gets to main / Export (push) Successful in 8m55s
Create tag and build when new code gets to main / ReleaseName (push) Successful in 3s
Create tag and build when new code gets to main / Release (push) Successful in 16m7s

This commit is contained in:
2026-02-17 15:33:07 +01:00
parent 9e39528b9a
commit bbb5149184
2 changed files with 8 additions and 6 deletions

View File

@@ -1200,10 +1200,8 @@ public partial class PlayerController : CharacterBody3D,
}
private float _timeOnWall;
public void OnWallStarted()
{
_timeOnWall = 0f;
if (_simpleDashCooldownTimer.IsStopped())
_canDash = true;
else
@@ -1219,7 +1217,6 @@ public partial class PlayerController : CharacterBody3D,
}
public void OnWallStopped()
{
_timeOnWall = 0f;
}
public void OnLeaveWallFromRun()
{
@@ -1229,7 +1226,6 @@ public partial class PlayerController : CharacterBody3D,
{
// _canDash = true;
// _canDashAirborne = true;
_timeOnWall += delta;
if (IsInputTowardsWall(_wallHugStartNormal))
WallHug(delta);
@@ -1264,7 +1260,6 @@ public partial class PlayerController : CharacterBody3D,
{
// _canDash = false;
// _canDashAirborne = false;
_timeOnWall += delta;
// Find horizontal velocity projected on the current wall
var hvel = new Vector3(Velocity.X, 0, Velocity.Z);
@@ -1393,9 +1388,10 @@ public partial class PlayerController : CharacterBody3D,
}
public void WallHang(float delta)
{
_timeOnWall += 1; // Consider we've already spent quite some time on wall
Velocity = Vector3.Zero;
GlobalPosition = _wallHugStartLocation;
if (GetGlobalMoveInput().Length() > Mathf.Epsilon)
_playerState.SendEvent("move");
}
public bool IsFacingWall()
{