public static Vector2 GetMousePosition(Camera camera) { Vector2 mousePosition = new Vector2(); mousePosition.X = Mouse.GetState().X; mousePosition.Y = Mouse.GetState().Y; return camera.ConvertToWorld(mousePosition); }