AR.js: Places more than 1km wont load

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

in Location-based it seems that places more than 1km away from the phone won’t show up despite having far value more than 1000 meters. It worked with the SAME code until 2 days before. I didnt change anything in my code and suddenly it doesn’t work. Some places that are about 1km away will show when having them in the center of the screen and won’t show if they are at the edges… Note 1) i have tried setting webcam-texture to true but it doesn’t work as when i make it true, the AR.js script won’t load. Note 2) I’ve noticed that when i click at a direction that i know that a place should show-render, it gets clicked! I can’t see it though, but it can be clicked and shows me the info that i want (it is more than 1km away). Note 3) When i set the far to something like 10-50 (so nothing would show - no places so close) it still shows places that are as far as 1km away. Like it ignores the far attribute of the a-camera. Note 4) I have tried setting the gps-camera attributes minDistance and maxDistance to very small numbers but still places render as far as 1km.

If the current behavior is a bug, please provide the steps to reproduce.

Just load the code from click-places and add a place more than 1km away

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

@nickw1 okay, hope u get it sorted out soon. Thanks for the guidance and helping me resolving the issue!

@nickw1 @AmirHossein-nr seems that embedded was the issue, i removed it and now everything seems to be working fine again (videoTexture works now, as well as far etc). Quick question though, i noticed that my AR places are not spawing close to their real location. Is there a way to improve accuracy and have spawn at least closer to where they should?

@antoniskamzel Hi There ! I Deleted “embedded” part in my code and it is Ok Now 😃 Try it . Maybe it fixes your code too

@nickw1 okay so here is the full code

AR.txt My biggest problem is not the clicks, i have them working fine. We need to figure out why the whole thing with the 1km distance is happening out of nowhere cause i remind you that one day this code was working like a charm, everything good and then this problem with the 1km distance appeared, no changes made

So if you can take a look and let me know!

To add to that, I have been meaning for a while to rewrite the A-Frame component to wrap the recently-introduced pure three.js implementation. I know the code better (Nicolò has little time to work on the project now) so this will help maintenance and bug-fixing I suspect.

I’m rather busy with the day job during the winter months, but hope to spend some time on this soon (as well as write a tutorial for the pure three version).

This is a known artefact if videoTexture is not set to true.

@antoniskamzel you say it doesn’t work if videoTexture is set to true, you say the AR.js script does not load. Does the browser console give you any errors?

One problem I did notice earlier in the week was that githack was not serving the AR.js code; if you say it worked one day and not the next, is this a possible explanation?