- Home /
I want to change headtracking data of oculus in unity
Hello I have a question about unity(5.6.0f3) and oculus(cv1)
I want to make a headtracking VR with some delay using oculus and unity
detailedly speaking when I rotate my head with oculus in Unity VR, the scene do not change immediately. After few seconds, the scene follows the head rotation.
To make that, I have to save headtracking data few seconds and load it. for the first step to make the delayed VR, I want to change headtracking data from oculus in unity
I thought related code is OVRCameraRig.cs in OVRCameraRig prefab, and UpdateAnchors function (below part)
trackerAnchor.localRotation = tracker.orientation; centerEyeAnchor.localRotation = VR.InputTracking.GetLocalRotation(VR.VRNode.CenterEye); leftEyeAnchor.localRotation = monoscopic ? centerEyeAnchor.localRotation : VR.InputTracking.GetLocalRotation(VR.VRNode.LeftEye); rightEyeAnchor.localRotation = monoscopic ? centerEyeAnchor.localRotation : VR.InputTracking.GetLocalRotation(VR.VRNode.RightEye); leftHandAnchor.localRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.LTouch); rightHandAnchor.localRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.RTouch);
So, I changed it like below
trackerAnchor.localRotation = tracker.orientation; centerEyeAnchor.localRotation = new Quaternion(0, 0, 0, 0); leftEyeAnchor.localRotation = new Quaternion(0, 0, 0, 0); rightEyeAnchor.localRotation = new Quaternion(0, 0, 0, 0); leftHandAnchor.localRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.LTouch); rightHandAnchor.localRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.RTouch);
However! There was no change! lol.. Head tracking was still good T . T I do not know what part should I change. If there is anyone who know about it, please comment...
Thank you for your reading
Your answer
Follow this Question
Related Questions
| DK2 Not Stereoscopic | Unity 5.1.2 | 1 Answer
Unity 5.2.2p2 Personal For Oculus 1 Answer
Run Tilt Brush Open Source code on Oculus Rift S 1 Answer
Unity Build not running on Oculus DK2 3 Answers
Unity app crashes if Oculus isn't worn 2 Answers