Repository: AR-js-org/AR.js

Issue #109: Objects appear at different sizes and places on different screen sizes/devices
Created: 2020-05-07T14:13:36Z
Do you want to request a feature or report a bug?
Report a bug


What is the current behavior?
If using AR.js A-frame NFT version on different devices, objects appear at different sizes and different locations relative to the marker image. Can't really describe the problem with words, or what causes it, but in your NFT example it also occurs
(https://github.com/AR-js-org/AR.js/blob/master/aframe/examples/image-tracking/nft/index.html)
Also I've attached some pictures below.
Seems to be realted to this issue so I'll describe this too:
when moving the camera around the marker image, the entire scene seems to move away from the marker, like the scene is not exactly placed on it.
Here is a picture of the basic isssue on Desktop

And on my Phone. You can see thet the model is larger than on Desktop and also appears at a different location

If the current behavior is a bug, please provide the steps to reproduce.
Check your AR.js A-frame NFT example on different devices with different screen sizes/cameras
(https://github.com/AR-js-org/AR.js/blob/master/aframe/examples/image-tracking/nft/index.html)
You can also try to view the T-rex from different angles, you will see that the T-rex is moving away from it's original location.


Please mention other relevant information such as the browser version, Operating System and Device Name
I've experienced this issue regadless the OS/browser (Tested it on Windows/Chrome, Android/Chrome, iOS/Chrome, iOS/Safari)
What is the expected behavior?
The scene should look exactly the same on every device, the objects locations and sizes shouldn't be affected by the screen/camera ratio and the camera's angle on the marker image.
Eg.: If we place the T-rex to the middle of the marker, it should appear there regardless of the device we use. Also when moving around the scene, the T-rex should stay in the middle.
If this is a feature request, what is motivation or use case for changing the behavior?
It's not a feature request

Duplicate issue #4: Cable centered position of content in NFT inside AR.js core
Created: 2020-02-29T18:50:43Z
Content is placed at 0,0 position. Can be useful if it's present at the center of the marker. We have to understand if this has to be fixed on jsartoolkit5 side (better) or on AR.js core.

Closing comment (2020-07-07T21:37:45Z): I have seen this same behavior using the NFT three.js sample. I added a red sphere to 0,0,0 and it shows up in different places depending upon the resolution and orientation of the phone (landscape vs. portrait). Is this really a duplicate of #109?This one seems to be more about making 0,0,0 be the center of the marker, which I agree would be convenient. However, #109  is about making the 0,0,0 coordinate be consistent, even if it is the lower left (which it is now). I suppose one wouldn't be possible without the other, but consistency of placement seems more important than where the origin is placed.
Attached some images I took on my Galaxy Tab S6 + Chrome + Android 10 at 640x480 and 480x640, in both portrait and landscape.