fix: jumping and dashing on tilted floor was triggering mantle in bad locations

This commit is contained in:
2025-06-19 14:36:31 +02:00
parent 21bc3f4724
commit 826eaac10c
2 changed files with 4 additions and 5 deletions

View File

@ -57,7 +57,7 @@ public partial class MantleSystem: Node3D
var shapeCastStartLocation = horizontalEndLocation + Vector3.Up * MantleHeightCastStart;
_mantleCast3D.SetGlobalPosition(shapeCastStartLocation);
var targetLocation = Vector3.Down * MantleHeightCastStart;
var targetLocation = Vector3.Down * MantleHeightCastStart + Vector3.Up * MaxStepHeight;
_mantleCast3D.SetTargetPosition(targetLocation);
if (_mantleCast3D.IsColliding() && _mantleCast3D.GetCollisionNormal(0).Y > 0.9f)