I am just getting to grips with the SDK an was wondering if there is an option to display not only a compass, but also the elevation angle the phone is being held at (based on sensor data)?
I have tried to get this from a seperate android function, but would like it within the AR world view (like the compass) if possible.
Thanks for any help;
Andy
A
Andreas Fötschl
said
over 8 years ago
Hi there!
You may extend the JS functionality manually, but note that this may affect the way Wikitude SDK is working and may not be supported in upcoming SDK versions. I attached code snippets that show how you can e.g. write "myCompass.value()" in JS and pass over any value from native Android code.
For the angle calculation please use common angle-calculations directly in JS. You know position of user and POIs - it is now simple math to calculate the angle between the two. Note that sometimes user's altude is not known, which kicks all altitude information by default. If you want the user to use a static altitude you have to manipulate "architectView.setLocation" and always pass e.g. "0.0f".
Hope that helps, Kind regards, Andreas
A
Andy Hawkes
said
over 8 years ago
Andreas, thank you for your reply. I will have a play and see if I can get the function I require.
Andy Hawkes