Closed west036 closed 8 years ago
Hi @west036,
Right now most of the initialization is done in the constructor of the OculusDevice class. Changing FOV would require to recalculate the projection matrix, which in it self is not that hard considering that Oculus has supplied us with convenience functions such as ovrMatrix4f_Projection()
. You would probably want to rescale your render texture as well which would require us to throw away our old texture and initialize a new one.Dynamic FOV updates is functionality that I don't have planned. But I have no objection including it if someone supplies me with a pull request containing proper code.
If you want to make static changes to the FOV you can easily change this your self. Right now OsgOculus is using the FOV values suggested by the Oculus API. If you want something else (larger or smaller) you can simply change the following lines: https://github.com/bjornblissing/osgoculusviewer/blob/920704914ed137ad23a6e669af5402079802f198/src/oculusdevice.cpp#L174-L175
Simply change the last argument to whatever FOV you like.
Best regards
DK1 version has this function, not now, I think this method can increase the Fov, do not know the new version is considered contain the function. Thanks.