From 5fb48c371caa210c7e7c54a20a58273c054d763a Mon Sep 17 00:00:00 2001 From: Astral-C Date: Sat, 6 Apr 2024 10:31:42 -0400 Subject: [PATCH] add some logging for picking debug --- src/UStarForgeContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/UStarForgeContext.cpp b/src/UStarForgeContext.cpp index 2d212a7..dcc7bab 100644 --- a/src/UStarForgeContext.cpp +++ b/src/UStarForgeContext.cpp @@ -471,8 +471,10 @@ void UStarForgeContext::Render(float deltaTime) { // Check picking for J3DUltra uint16_t modelID = std::get<0>(J3D::Picking::Query((uint32_t)mousePos.x - cursorPos.x, io.DisplaySize.y - (uint32_t)mousePos.y - (uint32_t)cursorPos.y)); + std::cout << "Readback model id is " << modelID << std::endl; for(auto object : mRoot->GetChildrenOfType(EDOMNodeType::Object)){ if(object->GetModel() != nullptr && object->GetModel()->GetModelId()== modelID){ + std::cout << "Selected model " << object->GetName() << std::endl; selected = object; break; }