Forum Discussion
unsafe
12 years agoHonored Guest
Browser support
Has anybody tackled sensor access from the browser? If not, I'm going to start a project to do that, either via a localhost nodejs server with V8 bindings to the SDK, or through a plugin.
ganzuul
12 years agoHonored Guest
I haven't gotten this far yet because I didn't have a sensor fusion library, but I think the right tool to use is three.js' requestAnimationFrame, which AFAIK is like an event-loop.
Just before a frame is rendered you should have a fresh quaternion ready in e.g. an ArrayBuffer. Ideally you should not wait for the quaternion nor should you use an old one, so the smart but also more difficult thing to do is predict where the quaternion would be pointing based on the latest few readings, while dropping impossible values.
With an update frequency of 1000Hz, solving less difficult problems first may be advisable. You can simply apply the latest quaternion to the camera angle just before rendering. I'm not actually familiar with the sensor fusion in the SDK yet; it may be you need to collect 5 ~ 7 quaternions and always pick their median.
Just before a frame is rendered you should have a fresh quaternion ready in e.g. an ArrayBuffer. Ideally you should not wait for the quaternion nor should you use an old one, so the smart but also more difficult thing to do is predict where the quaternion would be pointing based on the latest few readings, while dropping impossible values.
With an update frequency of 1000Hz, solving less difficult problems first may be advisable. You can simply apply the latest quaternion to the camera angle just before rendering. I'm not actually familiar with the sensor fusion in the SDK yet; it may be you need to collect 5 ~ 7 quaternions and always pick their median.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago
- 2 months ago
- 7 months ago