You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to track down the point where the Oculus rotation values are taken from the USB and brought into the vr.state.hmd.rotation variable. So far I've been able to track it to line 489, but I have a few questions.
what is global['vr_driver']? Right now, I'm assuming 'global' is the window object and ['vr_driver'] is some property on it, but I'm not to sure. When is 'global' defined? Is it the window object or am I completely off on that?
The .getOrientation() method that takes 'state.hmd.rotation' as a parameter...I have no idea what it means. Is it a primitive function? I can't find any reference to it in vr.js. Is it defined elsewhere?
Thanks for anything you can tell me. Just trying learn. The code I reference is below. Awesome library btw.
vr.DriverDataSource.prototype.poll = function(state) { //line 485
var present = this.driver_.isPresent();
state.hmd.present = present;
if (present) {
this.driver_.getOrientation(state.hmd.rotation); //<<---THIS LINE line 489
} else {
state.hmd.rotation[0] = state.hmd.rotation[1] = state.hmd.rotation[2] = 0;
state.hmd.rotation[3] = 0;
}
The text was updated successfully, but these errors were encountered:
Hey,
I'm trying to track down the point where the Oculus rotation values are taken from the USB and brought into the vr.state.hmd.rotation variable. So far I've been able to track it to line 489, but I have a few questions.
what is global['vr_driver']? Right now, I'm assuming 'global' is the window object and ['vr_driver'] is some property on it, but I'm not to sure. When is 'global' defined? Is it the window object or am I completely off on that?
The .getOrientation() method that takes 'state.hmd.rotation' as a parameter...I have no idea what it means. Is it a primitive function? I can't find any reference to it in vr.js. Is it defined elsewhere?
Thanks for anything you can tell me. Just trying learn. The code I reference is below. Awesome library btw.
vr.DriverDataSource.prototype.poll = function(state) { //line 485
var present = this.driver_.isPresent();
state.hmd.present = present;
if (present) {
this.driver_.getOrientation(state.hmd.rotation); //<<---THIS LINE line 489
} else {
state.hmd.rotation[0] = state.hmd.rotation[1] = state.hmd.rotation[2] = 0;
state.hmd.rotation[3] = 0;
}
The text was updated successfully, but these errors were encountered: