worldToScreen method

  1. @override
Vector2 worldToScreen(
  1. Vector2 position
)
override

This method convert word position to screen position

Implementation

@override
Vector2 worldToScreen(Vector2 position) {
  final worldPosition = camera.worldToScreen(position);
  return viewportPositionToGlobal(
    worldPosition,
  );
}