Enemy strafing

This commit is contained in:
MaddoScientisto 2025-03-23 18:22:12 +01:00
commit b35772f519
6 changed files with 112 additions and 16 deletions

View file

@ -66,4 +66,15 @@ public partial class NavigationMovementModule : Node2D
StorageModule.FacingDirection = _characterBody.Velocity.Normalized();
}
}
public bool IsNavigable(Vector2 newPos)
{
_navigationAgent.SetTargetPosition(newPos);
return _navigationAgent.IsTargetReachable();
}
public bool IsNavigationFinished()
{
return _navigationAgent.IsNavigationFinished();
}
}