put the player back in its place
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Test (push) Has been cancelled
Create tag and build when new code gets to main / Export (push) Has been cancelled

This commit is contained in:
2026-02-05 17:04:45 +01:00
parent 2a604fb06a
commit 52ebc68a02
3 changed files with 10 additions and 9 deletions

View File

@@ -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);