Skip to content

Commit

Permalink
fix(Interaction): use local rotation when inverting tracked snap handle
Browse files Browse the repository at this point in the history
The snap handle rotation is inverted when using a tracked object grab
mechanic. However, it was using the rotation to invert which caused
issues if the object had been rotated in the scene. Rotating the
local rotation of the snap handle is enough to fix the inversion issue
and this does not affect the object if it's world rotation has been
changed.
  • Loading branch information
thestonefox committed Jan 5, 2017
1 parent b0b8ed5 commit b211220
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -268,7 +268,7 @@ private void FlipSnapHandle(Transform snapHandle)
{
if (snapHandle)
{
snapHandle.rotation = Quaternion.Inverse(snapHandle.rotation);
snapHandle.localRotation = Quaternion.Inverse(snapHandle.localRotation);
}
}
}
Expand Down

0 comments on commit b211220

Please sign in to comment.