I have a problem with a small osc callback which changes the camera data.
Setting camera lens and manipulating the projection matrix seems not to work at the same time. I can either change the lens or manipulate projection matrix per frame.
I’m not much into the internals, maybe someone can help me out or give a pointer how the projection_matrix is applied.
def update_camera(self, path, args): scene = bge.logic.getCurrentScene() camera = scene.cameras[args] camera.lens = args camera.ortho_scale = args camera.near = args camera.far = args camera.perspective = args # if lens is changed the lensshift code will be ignored projection_matrix = camera.projection_matrix shift_x = args shift_y = args projection_matrix = 2*shift_x projection_matrix = 2*shift_y camera.projection_matrix = projection_matrix
Thanks in advance. offtools.