Forum Discussion
Teth
10 years agoHonored Guest
[unity5] Editing OVRCameraRig
Hi,
I’ve got a problem since I updated my project to unity 5 with 0.8.0.0b runtimes and 0.1.3.0-beta integration for unity.
For my project, I need to change how the headset is tracked in space. So I made some modifications to the OVRCameraRig script to change the behavior of the tracking. (I added some code in the UpdateAnchors() function to modify the localpositions of centerEyeAnchor, leftEyeAnchor and rightEyeAnchor.)
It worked well on unity 4.5 with v0.6.0.0 unity integration, but since we updated to 0.8.0.0 and unity 5 and the new beta integration, with the same modifications to the new OVRCameraRig, our code doesn’t affect the centerEyeAnchor anymore, but it still affect leftEyeAnchor and rightEyeAnchor (We can see it in the editor).
So when I build my program, it’s like my modification isn't even here.
Thanks for help.
I’ve got a problem since I updated my project to unity 5 with 0.8.0.0b runtimes and 0.1.3.0-beta integration for unity.
For my project, I need to change how the headset is tracked in space. So I made some modifications to the OVRCameraRig script to change the behavior of the tracking. (I added some code in the UpdateAnchors() function to modify the localpositions of centerEyeAnchor, leftEyeAnchor and rightEyeAnchor.)
It worked well on unity 4.5 with v0.6.0.0 unity integration, but since we updated to 0.8.0.0 and unity 5 and the new beta integration, with the same modifications to the new OVRCameraRig, our code doesn’t affect the centerEyeAnchor anymore, but it still affect leftEyeAnchor and rightEyeAnchor (We can see it in the editor).
So when I build my program, it’s like my modification isn't even here.
Thanks for help.
2 Replies
Replies have been turned off for this discussion
- vrdavebOculus Staff
"Teth" wrote:
How do you need to change it? Are you using some other tracking system or is there some special behavior you're trying to achieve?
I need to change how the headset is tracked in space.
Unity 5 updates the local pose of the center eye camera (or any Camera with targetTexture == null) natively before Update. You can't easily set the local pose after that, but you can set the pose of a parent GameObject to cancel it out so that the world pose is whatever you need it to be. Please see viewtopic.php?t=29065 for more discussion and pointers to an example of doing this in our Utilities. - TethHonored GuestI just need to change the tracking behavior, according to the oculus tracker values
"vrdaveb" wrote:
you can set the pose of a parent GameObject to cancel it out so that the world pose is whatever you need it to be.
Of course, thank you very much. I don't know why I was obsessed with centerEyeAnchor.
Sorry to have bothered you.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago
- 5 months ago