screenToWorld method

Vector2 screenToWorld(
  1. Vector2 argScreen
)

Takes the screen coordinates and return the corresponding world coordinates.

Implementation

Vector2 screenToWorld(Vector2 argScreen) {
  final translatedCorrected =
      argScreen - (translation..y *= (yFlip ? 1 : -1));
  return ((translatedCorrected - extents)..y *= -1) / scale;
}