From 92cba8dfe1034aa6fe7f2178183411a14efcd983 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 15 Jan 2022 11:41:27 +0000 Subject: We know the last param is distance now --- ui/gameMainWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp index b559341..f895a20 100644 --- a/ui/gameMainWindow.cpp +++ b/ui/gameMainWindow.cpp @@ -60,11 +60,11 @@ public: const auto mouse = glm::vec2 {e.button.x, e.button.y} / position.size; glm::vec2 baryPos {}; - float eh; + float distance; const auto ray = camera->unProject(mouse); - if (const auto selected - = gameState->world.applyOne(&Selectable::intersectRay, ray, &baryPos, &eh); + if (const auto selected = gameState->world.applyOne( + &Selectable::intersectRay, ray, &baryPos, &distance); selected != gameState->world.end()) { const auto & ref = *selected.base()->get(); clicked = typeid(ref).name(); -- cgit v1.2.3