globalToViewportPosition method

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

This method convert viewport position to word position

Implementation

@override
Vector2 globalToViewportPosition(Vector2 position) {
  return camera.viewport.globalToLocal(position);
}