Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Redundant isTracking if loop #703

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,15 @@ private void _UpdateRegions()
// Update the root transform;
transform.position = m_AugmentedFace.CenterPose.position;
transform.rotation = m_AugmentedFace.CenterPose.rotation;
}

foreach (AugmentedFaceRegion region in m_RegionGameObjects.Keys)
{
Transform regionTransform = m_RegionGameObjects[region];
regionTransform.gameObject.SetActive(isTracking);
if (isTracking)
foreach (AugmentedFaceRegion region in m_RegionGameObjects.Keys)
{
Transform regionTransform = m_RegionGameObjects[region];
regionTransform.gameObject.SetActive(isTracking);
Pose regionPose = m_AugmentedFace.GetRegionPose(region);
regionTransform.position = regionPose.position;
regionTransform.rotation = regionPose.rotation;
}

}
}
}
Expand Down