jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

How do I overlay text on top of a <a-plane> with AR.js and A-Frame? #590

Closed hsj63 closed 4 years ago

hsj63 commented 5 years ago

I am in a webAR project with AR.js and A-Frame and I am trying to overlay text on a plane or box, at first I thought the text was behind the plane but after I give an opacity of 0.5 to plane, I realized that the text is not really coexisting with the plane where the two intersect. What am I doing wrong?

I appreciate any help!

preview

My code:

Seluj78 commented 4 years ago

Hey man, have you tried with a z-index value superior to 1 ?

nicolocarpignoli commented 4 years ago

you should change position of the entities of aframe.

change the z axis value in https://aframe.io/docs/1.0.0/components/position.html

stemkoski commented 4 years ago

For an example, you could look at: https://stemkoski.github.io/AR.js-examples/text.html