diff --git a/cpp/source/features/callbacks_and_UIs.md b/cpp/source/features/callbacks_and_UIs.md index 246e985b..94ff1e67 100644 --- a/cpp/source/features/callbacks_and_UIs.md +++ b/cpp/source/features/callbacks_and_UIs.md @@ -140,7 +140,9 @@ if (io.MouseClicked[0]) { // if the left mouse button was clicked glm::vec3 worldRay = polyscope::view::screenCoordsToWorldRay(screenCoords); glm::vec3 worldPos = polyscope::view::screenCoordsToWorldPosition(screenCoords); std::pair pickPair = - polyscope::pick::evaluatePickQuery(screenCoords.x, screenCoords.y); + polyscope::pick::evaluatePickQuery( + io.DisplayFramebufferScale.x * screenCoords.x, + io.DisplayFramebufferScale.y * screenCoords.y); // print some values std::cout << " io.MousePos.x: " << io.MousePos.x << " io.MousePos.y: " << io.MousePos.y << std::endl;