Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D object moving or disappearing randomly (location-based AR) #639

Open
Fro5tyDog opened this issue Jan 9, 2025 · 6 comments
Open

3D object moving or disappearing randomly (location-based AR) #639

Fro5tyDog opened this issue Jan 9, 2025 · 6 comments

Comments

@Fro5tyDog
Copy link

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

What is the current behavior?
Teleporting and disappearing objects
If the current behavior is a bug, please provide the steps to reproduce.
Please see my issue presented here. aframevr/aframe#5620
A contributor refered me here.

Please mention other relevant information such as the browser version, Operating System and Device Name
Iphone 13 and running on iOS 18.1.1. Browser: Safari/605.1.15

What is the expected behavior?
Model should not be teleporting and disappearing randomly

If this is a feature request, what is motivation or use case for changing the behavior?

@nickw1
Copy link
Collaborator

nickw1 commented Jan 9, 2025

Expanding on my reply over in A-Frame:

If the GPS location data updates to an inaccurate location (which is possible), then the model will jump. Let's say the model is showing 10 metres to the north of you. You then get an inaccurate GPS reading, which places you 10 metres to the north of the model (i.e. the model is 10 metres to the south of this inaccurate reading). The model will jump so it appears to be south of you.

AR.js location-based does not attempt to track real world objects (e.g. using computer vision), it just uses GPS and sensors.

It could be inaccurate GPS readings or sensors, or it could be a bug in AR.js. In particular we are lacking developers with iOS devices so bugs are more likely to go undetected on iOS.

Could I ask you to try out this demo app?

https://github.com/AR-js-org/AR.js/tree/master/aframe/examples/location-based/basic-js

You'll need to clone the repository, start up a server and then request this page.

The expected result is that four boxes will appear: the red box to your north; the yellow box to your south; the blue box to your west and the green box to your east. These will all be placed with respect to your initial GPS position, so as you move, the positions of the boxes relative to your device will change.

If you let us know what behaviour this demo app has, we may be able to diagnose the problem. Thanks.

@Fro5tyDog
Copy link
Author

Hi the behaviour I observed is as followed.

The boxes are in the correct position to start and do not flicker throughout 1 full minute of the app being used. However, as I move these boxes stay the same distance away from me in all directions. They do not appear closer to me as I move in toward them. Neither do they move away from me as I move farther from them.

If this was what you expected, how can I ensure the boxes appear closer and farther to me as I move toward or away them respectively?

Thank you.

@nickw1
Copy link
Collaborator

nickw1 commented Jan 11, 2025

This is not what I expected but is a behaviour which others have observed. It could be an iOS issue; others have observed it in the past on certain devices but there has been no consistency with what devices produce this behaviour.

It is consistent with the app not receiving GPS updates.

Just to check the obvious: your GPS is turned on, and you have granted the application permission to use it?

Can I also ask you to try LocAR.js (https://github.com/AR-js-org/locar.js) and try out the similar example there? (Note, currently untested on iOS/Safari so not guaranteed to work in that environment in any case)

Not sure if Safari has dev tools allowing you to see the console log on a connected mobile device, but I would recommend trying that too because if there are any errors, they will be logged there.

Could be related to issue #463. Also see PR #520 which may fix it (as none of the maintainers have iOS devices we have been unable to test this unfortunately).

@Fro5tyDog
Copy link
Author

This is not what I expected but is a behaviour which others have observed. It could be an iOS issue; others have observed it in the past on certain devices but there has been no consistency with what devices produce this behaviour.

It is consistent with the app not receiving GPS updates.

Just to check the obvious: your GPS is turned on, and you have granted the application permission to use it?

Can I also ask you to try LocAR.js (https://github.com/AR-js-org/locar.js) and try out the similar example there? (Note, currently untested on iOS/Safari so not guaranteed to work in that environment in any case)

Not sure if Safari has dev tools allowing you to see the console log on a connected mobile device, but I would recommend trying that too because if there are any errors, they will be logged there.

Could be related to issue #463. Also see PR #520 which may fix it (as none of the maintainers have iOS devices we have been unable to test this unfortunately).

Hi there, yes I did.

@Fro5tyDog
Copy link
Author

This is not what I expected but is a behaviour which others have observed. It could be an iOS issue; others have observed it in the past on certain devices but there has been no consistency with what devices produce this behaviour.

It is consistent with the app not receiving GPS updates.

Just to check the obvious: your GPS is turned on, and you have granted the application permission to use it?

Can I also ask you to try LocAR.js (https://github.com/AR-js-org/locar.js) and try out the similar example there? (Note, currently untested on iOS/Safari so not guaranteed to work in that environment in any case)

Not sure if Safari has dev tools allowing you to see the console log on a connected mobile device, but I would recommend trying that too because if there are any errors, they will be logged there.

Could be related to issue #463. Also see PR #520 which may fix it (as none of the maintainers have iOS devices we have been unable to test this unfortunately).

Hi there, I have since been able to test all the various bugs you have suggested and the other example, https://ar-js-org.github.io/locar.js/

The Hello World works, but the model does not change relative to my position.
The GPS and Sensors does not work, I see no cubes despite having enabled the right settings on my phone. I have also enabled access to all the prompts.

I do not have access to a macbook to access the error logs.

@nickw1
Copy link
Collaborator

nickw1 commented Jan 13, 2025

Hi, unfortunately there isn't really a lot we can do at the moment without access to an iOS device.

This is why we really need contributors who have access to iDevices/Macs so we can resolve bugs on that environment. Really sorry I can't be more helpful, but if anyone reading this has an iDevice and would like to contribute to the project, you would be most welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants