๐งต#AR placement
Check if you have a WebARSessionRoot component in your scene. It controls where the center of your scene is. If you don't have an object with this component in your scene you can add one to it and place it. Alternatively make sure your content is in the root of the scene (at 0, 0, 0)
thank you for the fast answer. I do have webar session root set. It does not have any fields in the inpector right?
No, you just position it in your scene. Maybe first try to remove it and see if automatic placement is already working as expected. If not then add the WebARSessionRoot and move the object to e.g. the (bottom) center of your models.
<@755346535168081920> did you get it working?
oh i did not know that i can move the WebARSessionRoot to change the position!
makes sense now
and to reduce the scale, do i need to scale it down or just play around with the AR scale in web xr?
Both works altough I always modify AR scale in the WebXR component. In the next update will be improved previz in Unity for the AR placement/reticle.
Maybe you can also check if removing the SessionRoot and enabling AutoCenter is already giving you good results? It's using the bounds of the objects in your scene to calculate the AR placement center
remove it and results are much better
but i did reduce all object sizes in the scene to make it smaller as AR scale is not doing anything noticeable, yet again, i might be doing something wrong
It might be because scale is inverted:
- Large AR scale makes the scene appear small
- Small AR scale value makes the scene appear big
The reason for this is that internally we scale your XR rig/camera. This is so that when you use any networking features your AR representation is rendered at the correct position/rotation/scale.
do you recommend that i do not change the scale for the objects but the scale of the AR directly?
Maybe try updating to the latest version https://discord.com/channels/717429793926283276/1011401449013526598/1430184726529970249
You should then see a representation of the circle in your scene like in my video
Yes
is it weird that i do not see the scale representation?
Most of the time you want to build your scene in 1:1 scale (where 1 unit is approx. 1 meter). Because then all the PBR rendering materials work correctly and you're not actually rendering a minitiature object (which is scaled up or down).
You need to update, we released this version a few minutes ago. You can update via the Needle Engine component (at the bottom) or via "Window/PackageManager/Needle Engine"
The footer of the Needle Engine component shows which version you're currently using. 4.11.3 is the latest version.
yes updated and i see it now!
so the recommendation is all object scale are set to 1 and i play around with the AR scale
that should effect the entire scene scale
Yes
is there a way to link the AR scale to the actual scene? Since i just made everything scale 1, and reduced the ar scale below 1 and even tried scale 5, still no changes in the actual scale
Can you show some screenshots of your scene and components that you're using?
Make sure you dont have multiple WebXR components in the scene (or maybe multiple WebARSessionRoot objects).
Ah ok you're using the physics playground as a starter? I just tried and it works fine for me
Try enter AR here, it should be pretty tiny: https://physics-playground-ar-z23hmxbzt0ock-zt0ock.needle.run/
you can search the scene like this for specific components
Yes i started with this sample and im building on it
Might have messed something up then?
Not exactly sure, maybe try to compare with the sample again what's different.
If you dont find the culprit please send a bugreport and we'll try to look at it the next few days.
thank you this worked!
Great! What was the issue/what did you change?
I just opened a new project, loaded the sample in and it was working. I might have ticked something off or deleted a game object whilst testing.
<@272528485732450305> hello marcel, i have one more question. Is there a way to end the AR session programatically, instead of the user having to exit it.
Yes, use the static stop method on NeedleXRSession for example: https://engine.needle.tools/docs/api/classes/Engine_Core.NeedleXRSession.html#stop
Api: https://engine.needle.tools/docs/api/classes/Engine_Core.NeedleXRSession.html
From Needle Engine components if there is an xr session active you can also access it with the this.context.xr propery: https://engine.needle.tools/docs/api/classes/Engine_Core.Context.html#xr
Just in case you need it and if you're not familiar with it yet ๐ via this.context you also get the camera, renderer, root scene and so on
thats amazing thank you! On a side note, I have exported the project out to Needle Cloud. I am also using https://play.eyejack.xyz/ to make it work with app clip. Its working and i am able to play the AR. However, the AR HTML overlay are not working. Is this something you have ever encountered ?
HTML overlays are supported by Needle Engine if the browser or AppClip supports it (e.g. Chrome on Android with WebXR). In this case it seems eyejack has no support for HTML overlays but I'll check back. I think we reported this to eyejack and are in contact with them but will check back and let you know.
Oh okay thank you. Is this something i can workaround? Do you think there is another tool? Variant launch maybe
It seems like they have support, at least there's a troubleshooting page for when it's not displayed: https://launch.variant3d.com/docs/troubleshooting/dom-overlay
okay perfect, this seems like a proper alternative then to look into
thank you Marcel, i appreicate your continuous support!
<@272528485732450305> hello marcel, i couldnt find anything online about removing the little X on the top right that exits the AR. Would appreciate if you can point me in the right direction!
Hello <@755346535168081920> will look into it, I'm not sure if there's an option exposed right now but if not I think we can add one with the next update.
this is great thank you!
hello <@272528485732450305> , for some reason the AR placement adjustment is set to off, but the AR scene is weridly still moving on touch. Am i missing anything or?
Do you have a deployed scene for me to look at?
Feel free to dm if you cant share here