🚧 WIP detection works now

This commit is contained in:
2025-12-12 13:46:32 +01:00
parent 7ffbb8e68d
commit 9e0e87ef17
13 changed files with 105 additions and 99 deletions
@@ -8,7 +8,7 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
public partial class DetectionCross : Node2D
{
[Export] private Detector _collider;
[Export] private RaycastDetector _detector;
[Export] private ShapeCast2D _shapeCast2D;
[Export] private float _xOffset;
[Export] private float _yOffset;
@@ -20,6 +20,6 @@ public partial class DetectionCross : Node2D
{
Vector2 newPos = new Vector2(direction.X * _xOffset, direction.Y * _yOffset);
_collider.Position = newPos;
_detector.TargetPosition = newPos;
_shapeCast2D.TargetPosition = newPos;
}
}