Hi, I am trying to build a somewhat realistic mirror inside vr. I have achieved the wanted result when playing without vr by positioning the camera on the other side of the mirror and adjusting the angle, as seen in the first example. However, when I apply the same logic inside vr, I get quite weird results, and I’m not sure what the issue could be. To minimize room for error, I have tried to keep same aspect ratios everywhere. The mirror itself is 1:1, the main camera aspect ratio is 1 (although it seems to make no difference when inside vr). The render target has a 1:1 capture resolution to have the same aspect ratio as the camera.
I have tried playing with the scene capture 2d component fov to see if any values would be even close to wanted result, but no cigar.
I have also tried applying the fov’s given by
GEngine->XRSystem->GetHMDDevice()->GetFieldOfView(), and setting render target resolution to GEngine->XRSystem->GetHMDDevice()->GetIdealRenderTargetSize() insteead of a 1:1.
I am trying to only get the correct image in left eye at the moment.
I have tried mirroring both the main camera, and the left eye camera by using
GEngine->StereoRenderingDevice->CalculateStereoViewOffset(EyeIndex, CameraRotation, 1, CameraLocation). The positioning and rotation of scene capture seems correct, but everything else not so much. For example, when running backwards the whole scene in the mirror seems to shift down and left instead of just getting “smaller”. I am using this material which I understand should project the captured image across the entire screen. I’m just unsure if it would be centered at the correct eye in this case…
Here are the video examples of what the mirror looks like in non vr followed by vr.