unprojectVector method

  1. @override
Vector2 unprojectVector(
  1. Vector2 screenCoordinates
)
override

Converts a vector in the screen space to the world space.

This considers both the translation and scaling transformations.

Implementation

@override
Vector2 unprojectVector(Vector2 screenCoordinates) {
  return _components.reversed.fold(
    screenCoordinates,
    (previousValue, element) => element.unprojectVector(previousValue),
  );
}