🚧 interaction kinda sorta works now, still needs tweaking

This commit is contained in:
2025-12-10 16:57:39 +01:00
parent a6260efc07
commit b232cb31c3
5 changed files with 8 additions and 6 deletions
@@ -19,7 +19,7 @@ public partial class DetectionCross : Node2D
public void SetDirection(Vector2 direction)
{
Vector2 newPos = new Vector2(direction.X * _xOffset, direction.Y * _yOffset);
_collider.GlobalPosition = newPos;
_collider.Position = newPos;
_detector.TargetPosition = newPos;
}
}
@@ -46,6 +46,7 @@ public partial class InteractionArea2D : Node2D
public void OnPlayerEntered(Node2D player)
{
GD.Print("OnPlayerEntered: " + this.GetParent().Name);
if (!_active || !InputService.Instance.InputEnabled)
return;
@@ -32,6 +32,7 @@ public partial class RaycastDetector : RayCast2D
_lastDetected.NoLongerDetected();
}
GD.Print("Colliding with: " + interactionArea.GetParent().Name);
_lastDetected = interactionArea;
interactionArea.Detected();
}