Skip to content

Commit dfde4f8

Browse files
committed
Stop solvers from reversing when the target is the head
1 parent 0db78fb commit dfde4f8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Assets/HoloToolkit/Utilities/Scripts/Solvers/SolverHandler.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,12 @@ private Transform MakeOffsetTransform(Transform parentTransform)
216216
transformWithOffset.transform.localPosition = AdditionalOffset;
217217
transformWithOffset.transform.localRotation = Quaternion.Euler(AdditionalRotation);
218218
transformWithOffset.name = string.Format("{0} on {1} with offset {2}, {3}", gameObject.name, TrackedObjectToReference.ToString(), AdditionalOffset, AdditionalRotation);
219-
// In order to account for the reversed normals due to the glTF coordinate system change, we need to provide rotated attachment points.
220-
transformWithOffset.transform.Rotate(0, 180, 0);
219+
220+
if (TrackedObjectToReference != TrackedObjectToReferenceEnum.Head)
221+
{
222+
// In order to account for the reversed normals due to the glTF coordinate system change, we need to provide rotated attachment points.
223+
transformWithOffset.transform.Rotate(0, 180, 0);
224+
}
221225

222226
return transformWithOffset.transform;
223227
}

0 commit comments

Comments
 (0)