I’m trying to change the shift_x property of the Camera object per eye.
(The stereo camera runs two renders per frame. One for each eye)
from bge import logic, render def main(): scene = logic.getCurrentScene() objects = scene.objects cam = objects['Camera'] if render.getStereoEye() == render.LEFT_EYE: print('left') cam.shift_x = 0.3 if render.getStereoEye() == render.RIGHT_EYE: print('right') cam.shift_x = -0.3 main()
But my code above will just run once when the program is started. How do I access the main render loop?
I tried searching for this but there’s nothing on it at all.
There should be a lens shift setting per eye when you use the stereo camera. Also a barrel distortion setting instead of messing with matrices. BGE could really take off as a VR/AR game engine if these settings would be more accessible.