globalToViewportPosition method

Offset globalToViewportPosition(
  1. Offset position
)

Implementation

Offset globalToViewportPosition(Offset position) {
  if (!hasGameRef) return position;
  return gameRef.globalToViewportPosition(position.toVector2()).toOffset();
}