Start a new topic

Get compass information / values

Get compass information / values


Hello,

Just seen this thread https://support.wikitude.com/support/search/topics?term=Get+Sensor+Informations
I would also like to get the compass values in a world browser.

Is this possible in the new SDK for phonegap?

Hi !

I'm updating this thread because it's something I also need in my app.

In fact, as we can set up a callback for "onLocationChanged" event (in another word, react to gps changes), I was rather surprised (and a little bit disappointed) to see that there were no similar mechanism to react to other sensors event. Since Wikitude is using this sensors anyway, you really ought to give developpers ways to react to changes on this sensors...

It appears that we can't access cordova plugin from within the AR View (the cordova-plugin-device-orientation for example). So the only alternative is, as someone suggested in the thread linked above, to "manually" access the compass in the cordova app and send it to the AR View with callJavaScript, at regular interval, which seems to me like an overcharge.

Anyway, it would be really nice to have an API on sensors update from within the AR View.
Login or Signup to post a comment