Hi guys ! Hoping youre doing good.
I´m trying the AR option in some samples (the button START AR) but nothing happends. unlike the VR which works well. I´m using a Redmi 9 with Android 11 (RP1A) and I was wondering if there is a way to know if my mobile is not compatible or something like that.
Thanks
Original Post on Discord
by user 632418299711324161
Quick way to test is: go to https://modelviewer.dev and check if AR works there
If it does: it should work in Needle Engine too!
We’ve seen some devices and cases already where the browser reports AR as available but then actually doesn’t do anything; in some cases a device restart fixed that
Thanks, unfortunately my device doesn´t work but I found whan which does.
One quest about the WebImageTracking. Is there any way to detect when the image corresponding to the model of one of the Tracked Images is detected ? Like a event to suscribe or something loike that ? Because I want to detect that from a outside class.
I have been checking the script and I found this lines :
by user 632418299711324161
You get onEnable/onDisable callbacks on the tracked object, so you can just add a component to it that does what you want to do in onEnable/onDisable
Oh thats so clear, thank you : ) It will be helpful.
by user 632418299711324161
Hi I´m trying to change the color of the model each time that the model is enable but is not working. When I start a AR session the model appears in front of me all the time and when the image is reconigzed , the model is placed over the image. I think that it is not disabling and enabling because is in front all the time, do you know what is happening ?
by user 632418299711324161
Parent it to the WebARSessionRoot
So
- Camera
- WebXR (has WebXR and USDZExporter components)
- WebARSessionRoot (has WebARSessionRoot component)
- Image Tracking (ImageTracking component)
yea
by user 632418299711324161
Wait, with WebARSeessionRoot you mean the object which holds this components :
by user 632418299711324161
by user 632418299711324161
There’s an actual component called “WebARSessionRoot”
It’s implicitly added when you don’t have it but for better control you can put it in the scene
Doesn’t need to be on the same object as WebXR/USDZExporter though
Okey, thank you. I´ll try it.
by user 632418299711324161
Updated the structure above with a typical one
Thanks
by user 632418299711324161
I have updated as you said and is happening the same. This is my structure :
by user 632418299711324161
My WebXR component :
by user 632418299711324161
by user 632418299711324161