Skip to content

Commit 98ef32d

Browse files
committed
Update cachedTransform instead of transform.
1 parent 11a3c78 commit 98ef32d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/src/VRViewer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ void OnDisable()
7979

8080
//Updates the position and rotation of the head
8181
public void UpdateViewerHeadPose(OSVR.ClientKit.Pose3 headPose)
82-
{
83-
transform.localPosition = Math.ConvertPosition(headPose.translation);
84-
transform.localRotation = Math.ConvertOrientation(headPose.rotation);
82+
{
83+
cachedTransform.localPosition = Math.ConvertPosition(headPose.translation);
84+
cachedTransform.localRotation = Math.ConvertOrientation(headPose.rotation);
8585
}
8686

8787
//Culling determines which objects are visible to the camera. OnPreCull is called just before this process.

0 commit comments

Comments
 (0)