Skip to content

Commit

Permalink
Fixed collision visual bounding boxes (#746)
Browse files Browse the repository at this point in the history
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
  • Loading branch information
jennuine committed Apr 7, 2021
1 parent 4e69556 commit 3e8d4e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/rendering/RenderUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2117,5 +2117,19 @@ void RenderUtil::ViewCollisions(const Entity &_entity)

this->dataPtr->viewingCollisions[colEntity] = showCol;
colVisual->SetVisible(showCol);

if (showCol)
{
// turn off wireboxes for collision entity
if (this->dataPtr->wireBoxes.find(colEntity)
!= this->dataPtr->wireBoxes.end())
{
ignition::rendering::WireBoxPtr wireBox =
this->dataPtr->wireBoxes[colEntity];
auto visParent = wireBox->Parent();
if (visParent)
visParent->SetVisible(false);
}
}
}
}

0 comments on commit 3e8d4e7

Please sign in to comment.