Skip to content

Commit

Permalink
add some logging for picking debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Astral-C committed Apr 6, 2024
1 parent 48a77dc commit 5fb48c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/UStarForgeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SObjectDOMNode>(EDOMNodeType::Object)){
if(object->GetModel() != nullptr && object->GetModel()->GetModelId()== modelID){
std::cout << "Selected model " << object->GetName() << std::endl;
selected = object;
break;
}
Expand Down

0 comments on commit 5fb48c3

Please sign in to comment.