worldToScreen method

Vector2 worldToScreen(
  1. Vector2 position
)

Takes a point in world coordinates and returns it in screen coordinates.

Implementation

Vector2 worldToScreen(Vector2 position) {
  return camera.localToGlobal(position);
}