fix: now hanging on walls of all orientations
This commit is contained in:
@ -152,7 +152,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
{
|
||||
if (WeaponSystem.FlyingState.Active)
|
||||
{
|
||||
DashSystem.DashResolve = new DashResolveRecord(false, WeaponSystem.PlayerDashLocation, Vector3.Zero);
|
||||
DashSystem.DashResolve = new DashResolveRecord(false, WeaponSystem.GlobalPosition, Vector3.Zero);
|
||||
}
|
||||
else if (WeaponSystem.PlantedState.Active)
|
||||
{
|
||||
@ -160,6 +160,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
DashSystem.DashResolve = new DashResolveRecord(false, WeaponSystem.PlayerDashLocation, Vector3.Zero);
|
||||
}
|
||||
_dashDirection = (DashSystem.DashResolve.DashLocation - GlobalPosition).Normalized();
|
||||
GD.Print(_dashDirection);
|
||||
DashSystem.Dash();
|
||||
}
|
||||
|
||||
@ -186,7 +187,8 @@ public partial class PlayerController : CharacterBody3D
|
||||
}
|
||||
|
||||
// Store the weapon state before resetting it
|
||||
var isPlantedOnWall = WeaponSystem.PlantedState.Active && WeaponSystem.GlobalRotation.Dot(Vector3.Up) < 0.1;
|
||||
var isPlantedOnWall = WeaponSystem.PlantedState.Active
|
||||
&& (Math.Abs(WeaponSystem.GlobalRotation.X) + Math.Abs(WeaponSystem.GlobalRotation.Z) < 0.3);
|
||||
var isFlying = WeaponSystem.FlyingState.Active;
|
||||
|
||||
// Get the weapon back
|
||||
|
Reference in New Issue
Block a user