getPathToPosition method
Implementation
List<Vector2> getPathToPosition(
Vector2 position, {
List<GameComponent>? ignoreCollisions,
}) {
_ignoreCollisions.clear();
_ignoreCollisions.addAll(shapeHitboxes);
ignoreCollisions?.forEach(
(comp) => _ignoreCollisions.addAll(comp.shapeHitboxes),
);
return _calculatePath(position);
}