Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
AdamsImmersive's avatar
AdamsImmersive
Honored Guest
12 years ago

Can't change OVRCameraController backgr. color or clipping?

OVRCameraController (and the 2 child cameras) defaults to a blue background color, which I need to change to black.

Following the PDF docs, I change the color in the OVRCameraController. (This is Unity 4.2 and OVR SDK 0.2.4.)

But when I hit Play, it reverts to blue. (If I also change the colors for the 2 individual cameras, one of them reverts to blue but not the other.)

When I hit Stop, the blue remains, even though Unity playback shouldn't normally permanently affect Inspector values.

EDIT: Same for near clip and far clip; the editor shows my values, even after a quit and reload--until I hit Play. Then they revert to defaults, and stay there even after I Stop.

I'm going to modify the OVR code to try to override this, but it's a hacky approach. What's the right way to do change settings for OVRCameraController and its child cameras?

EDIT 2: I have added [SerializeField] in a few places to help (I'm a JavaScript guy, not C#, but I found that tip here for clipping planes). And it works--the settings stick. But...

- Is there a way to just use those settings as explained in the PDF, without modding the OVR scripts? I worry that my changes will be lost with new SDKs if that's the way to do it. (I'm at least leaving my name in comments to find those lines again.)

- My chosen clipping planes work when I Play in the editor--but are ignored in an actual build. Probably a bug--looks pretty bad (you can see your own body sliced off at the chest, hollow legs and all, when you look down). Then, after the build (even if I quit and reload) the clip values stop working in editor play too; but when I click on the OVRCameraController to check the values, my own values are still shown (not reverted). And then when I Play again, the editor clipping is fine once again. It's as though Build temporarily reverts to default clipping values, and a simple click t select OVRCameraController is enough to resolve the problem--but only in the editor, not in the executable.

Any workarounds to make a Build use my clipping values? (I haven't tried hard-coding them into the C#... hacky and not future-proof, but I'll try it if I can find where to do it.)

Thanks for any ideas!

21 Replies

Replies have been turned off for this discussion