location based ar fails after phone goes to sleep and unlocked again #361
Replies: 3 comments 2 replies
-
Hello Roel, is the source code available? Obviously if you are prepared to share it, anonymise your test lat and lon. Then I can have a look. This might be related to #278 possibly. |
Beta Was this translation helpful? Give feedback.
-
Shure, This is just the basic example though.
I might have found a solution to. I dived into the source code of the camera and found a play and pause function.
What this does is when the phone is locked. Just before that happens this event is triggered. When the state is hidden. (Phone locked, other tab) I pause the camera. Meaning the gps location watch is removed. It would be nice to recalibrate the origin position back to the phones current location and reposition all entity's based on the long lat they have vs the new origin. Just a idea. Kind regards |
Beta Was this translation helpful? Give feedback.
-
Hi @bildekrokodil I have made some fixes with the way the Web Mercator coordinates are handled. It no longer stores them relative to the original position, but as absolute world coordinates. I have also turned off the Try using https://hikar.org/loc-fix/aframe-ar-nft.js as your AR.js source, and see if that works. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I hope somebody can help me out here.
I created a small project. I added a simple box in the street I live in. When I open the website I can see the box in the street.
And walk to it. It is accurate. But.... From the moment I wait to long. The phone is going to stand by. Wich is normal.
When I unlock the phone again. The website is still running. a few moments later the box jumps way off its position.
I tried it with both. The gps-camera and the gps-projected-camera.
I tried to remove the box with javascript and replace it again so it might simply update its location based on the phones position. But that is not the case. When I refresh the page. It is back to normal.
How can I fix this. I even tried to reset the original coordinates on the camera but nothing works. It also seems like the gps-camera-update-position keeps givving the same lat long and does not update anymore.
Kind regards
Roel
Beta Was this translation helpful? Give feedback.
All reactions