OVRCameraController - change clipping planes at runtime
Hi,
We need to change the clipping planes in the OVRCamera - for a short period of time to see a close-up. Then back to normal to render the rest of the scene with finer Depth Buffer in the higher distances.
Normally this works with
With the Oculus Rift Cameras from the OVRCameraController prefab, I didn't find a way to adjust that value directly in runtime.
Tried the following:
It did show the change in the Camera's public NearClipPlane variable, but it clipped away the close up object anyway.
The work-around to this problem is to set-up two OVRCameraController prefabs with the according clip planes and then set the GameObjects active/inactive.
However, I'd be grateful if setting the clipping planes would work the same way it does with the standard Camera.
We need to change the clipping planes in the OVRCamera - for a short period of time to see a close-up. Then back to normal to render the rest of the scene with finer Depth Buffer in the higher distances.
Normally this works with
Camera cameraVar;in C#
camVar.nearClipPlane = X.XXf;
With the Oculus Rift Cameras from the OVRCameraController prefab, I didn't find a way to adjust that value directly in runtime.
Tried the following:
OVRCameraController ovrCameraControllerVar;
OVRCamera ovrCameraVar;
Camera cameraVar;
void FixedUpdate () {
oVRCameraControllerVar.NearClipPlane = X.XXf;
oVRCameraControllerVar.camera.nearClipPlane = X.XXf;
oVRCameraVar.camera.nearClipPlane = X.XXf;
cameraVar.nearClipPlane = X.XXf;
}
It did show the change in the Camera's public NearClipPlane variable, but it clipped away the close up object anyway.
The work-around to this problem is to set-up two OVRCameraController prefabs with the according clip planes and then set the GameObjects active/inactive.
However, I'd be grateful if setting the clipping planes would work the same way it does with the standard Camera.
