globalToLocal method

Vector2 globalToLocal(
  1. Vector2 point, {
  2. Vector2? output,
})

Convert a point from the global coordinate system to the viewfinder's coordinate system.

Use output to send in a Vector2 object that will be used to avoid creating a new Vector2 object in this method.

Opposite of localToGlobal.

Implementation

Vector2 globalToLocal(Vector2 point, {Vector2? output}) {
  return transform.globalToLocal(point, output: output);
}