Hellp World,
I have been trying to get the (now apparently abandoned) cesium-vr (
https://github.com/NICTA/cesium-vr)
code working. I am finally trying to implement what Sean (from Mozvr team) suggested me
about "single getEyeParameters call that returns a structure with the
individual eye parameters as the fields eyeTranslation, renderRect, and
recommendedFieldOfView" suggested in relation to the Head Mounted Display (HMD- Google Cardboard in this case) function calls.
I tried to make the corresponding changes in the
https://github.com/NICTA/cesium-vr/blob/master/src/CesiumVR.js file where these parameters are accessed. In this light I made changes to lines (101-110):
that.xEyeTranslation = {
left : that.hmdDevice.getEyeTranslation('left').x,
right : that.hmdDevice.getEyeTranslation('right').x
};
// Holds information about the recommended FOV for each eye for the detected device.
that.fovs = {
left : that.hmdDevice.getRecommendedEyeFieldOfView('left'),
right : that.hmdDevice.getRecommendedEyeFieldOfView('right')
};
I changed the lines to:
that.xEyeTranslation = {
left : that.hmdDevice.getEyeParameters("left").xEyeTranslation,
right : that.hmdDevice.getEyeParameters("right").xEyeTranslation
};
// Holds information about the recommended FOV for each eye for the detected device.
that.fovs = {
left : that.hmdDevice.getEyeParameters('left').recommendedFieldOfView,
right : that.hmdDevice.getEyeParameters('right').recommendedFieldOfView
};
But this does not solve all my troubles and I get trapped by an error from lines 188 and 195 where
slave.frustum.setOffset is called. I have no clue what to do about these parameters since calls to
slave.frustum.aspectRatio (line 186) are clearly supported.
I'd love to get this working since I believe VR is a great way forward and any help from the community would be really great. I promise that if and when I get this working, I shall create a fork of the code for other developers to work upon.
Thanks and Cheers!
Gaurav