Skip to content

Commit

Permalink
Minor fix for projector visibility flags (#920)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Oct 5, 2023
1 parent dad0364 commit c1af6fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ogre2/src/Ogre2Projector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ void Ogre2Projector::UpdateCameraListener()
{
// if a custom visibility flag is set, we will need to use a listener
// for toggling the visibility of the decal
if (this->VisibilityFlags() == GZ_VISIBILITY_ALL)
if ((this->VisibilityFlags() & GZ_VISIBILITY_ALL) == GZ_VISIBILITY_ALL)
{
this->dataPtr->decalNode->setVisible(true);
this->dataPtr->decalNode->getCreator()->setDecalsDiffuse(
this->dataPtr->decal->getDiffuseTexture());

for (auto &ogreCamIt : this->dataPtr->camerasWithListener)
{
Expand Down

0 comments on commit c1af6fd

Please sign in to comment.