put the player back in its place
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user