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
Firstly, I have to say thank you for the awesome and useful repository. It has made learning VR in the browser approachable.
I have been developing a display reticle manger to help with gaze interactions and found that when testing on different phones e.g. iOS and Android the initial load position differs, even on the same device at different orientations (i.e. iPhone 6 holding it in landscape and portrait will generate different results).
Have you considered normalizing the accelerometer and gyroscope data before sending it back to VRControls.js? For example using a similar approach as gyronorm.js you could update the alpha, beta and gamma values in getOrientation method allowing for most mobile devices to have a similar result...
Below is very rough example of what I mean.
GyroPositionSensorVRDevice.prototype.getOrientation=function(data){if(this.deviceOrientation==null){returnnull;}// Rotation around the z-axis.//var alpha = THREE.Math.degToRad(this.deviceOrientation.alpha);varalpha=THREE.Math.degToRad(data.do.alpha);//console.log(alpha, data.do.alpha)// Front-to-back (in portrait) rotation (x-axis).//var beta = THREE.Math.degToRad(this.deviceOrientation.beta);varbeta=THREE.Math.degToRad(data.do.beta);// Left to right (in portrait) rotation (y-axis).//var gamma = THREE.Math.degToRad(this.deviceOrientation.gamma);vargamma=THREE.Math.degToRad(data.do.gamma);
The text was updated successfully, but these errors were encountered:
skezo
changed the title
normalize the accelerometer and gyroscope data on mobile devices
Suggestion/Question: normalize the accelerometer and gyroscope data on mobile devices
Aug 25, 2015
What do you mean about the initial load position? Where you are initially looking in VR is inevitably going to fluctuate, since we don't rely on the compass/magnetometer for some absolute reference.
As far as I can tell, this gyronorm.js thing is mainly for just ensuring that the values are consistent regardless of phone orientation (ie. landscape / portrait), which should already be the case.
Ignore my initial post. After playing it with some more I realized that using something like gyronorm.js was not the best approach to fix this. Your below point highlights this perfectly. I found it is something that you need design for instead.
Where you are initially looking in VR is inevitably going to fluctuate, since we don't rely on the compass/magnetometer for some absolute reference.
Thanks again for the reply and the work you are doing on this.
Firstly, I have to say thank you for the awesome and useful repository. It has made learning VR in the browser approachable.
I have been developing a display reticle manger to help with gaze interactions and found that when testing on different phones e.g. iOS and Android the initial load position differs, even on the same device at different orientations (i.e. iPhone 6 holding it in landscape and portrait will generate different results).
Have you considered normalizing the accelerometer and gyroscope data before sending it back to
VRControls.js
? For example using a similar approach as gyronorm.js you could update thealpha
,beta
andgamma
values ingetOrientation
method allowing for most mobile devices to have a similar result...Below is very rough example of what I mean.
The text was updated successfully, but these errors were encountered: