I think when entering/exiting AR in the Quest 3 causes the main camera in the browser to change to a different one as all screen space overlay canvas in the scene stop rendering and I can't see any objects in the scene. I am using WebXR AR scene scale at 25 but that isn't the cause of this from my testing. I do get the attached error when returning from AR but only sometimes - firstElem.toArray is not a function - see this issue happening in the video here https://discord.com/channels/717429793926283276/1260183741909958657
#Enter/Exit AR on Quest 3 breaks rendering of Screen Space Overlay Canvas and camera position
1 messages · Page 1 of 1 (latest)
Thanks for reaching out @lofty island
Please read through the following and share the information requested. This will help us to better assist you.
Description
Describe the issue that you're seeing. Please be as detailed as possible e.g. is this issue happening in Unity or Blender, which Needle Engine version are you using, do you see any errors in the Editor or Browser console, etc.
Information:
- If you're using Unity click the menu item Needle Engine/Report a Bug/Copy Project Info to Clipboard. Please share the results below.
- Please provide code snippets using Discord Code Blocks
- Have you contacted Needle through another channel or just through Discord?
Useful Links
- Needle Engine Samples - Find examples that you can download or try out in the browser for many common usecases
- Needle Engine Documentation
Did you know 💡
We now also have a forum with AI support: Join now with your discord account - or request help by clicking the button below.
Submitted another minimal repro for this from a fresh project, hope it helps
WebXR - Use Depth Sensing is the cause of the canvas/world not rendering after AR on Quest 3 issue
Thanks for the update!!! Will look into it
It doesnt reproduce for me in a normal / new project (with depth sensing and worldspace canvas+objects) - will try your project
I'm not sure what else is affecting it on the canvas in that case, possibly Canvas data component values? Let me know if it reproduces in my project
It does. Seems to be tied to the screenspace canvas
WebXR - Use Depth Sensing is the cause of the canvas/world not rendering after AR on Quest 3 issue
@shrewd lance Is there any workaround for this btw, can I force a refresh of the web page when exiting AR on the Quest just so the canvas and gameobjects render when we return from AR
You could do that yes - I'll also see if this issue persists in the next threejs version which we will be updating to soon. But until then as a hotfix you can try refreshing. Something like this in a component could work
onLeaveXR(args:NeedleXREventArgs) {
if(args.xr.isPassThrough) { <refresh> }
}
So just to check, this is a three.js issue when activating the depth render pass on Quest devices?
That's my suspicion but I haven't verified it yet
Thanks, please do let me know if you investigate further, as it seems some things render like the skybox but Needle created things like 3d objects/worldspace canvas no longer render
If there is anything I can do to help test or verify if it is three.js or Needle, just let me know!
@lofty island the solution is simply that threejs modifies the camera near and far plane according to depth values and they are never reset. I'll add a fix for it in Needle Engine when the XR session ends but you can already do this in your code if you want to by just re-assigning the near and far plane settings to the active camera and call updateProjectionMatrix
A fix will also be available shortly in NE
Noticed the fix working in 3.46.0 preview as I just tried that, thanks for sorting it out 🙂 if any further tweaks are added in a later version just let me know and I'll keep testing
3.46 doesnt have the fix yet - unless you added it in your code 😉
Ah you are right, I added something yesterday that might be doing that, I'll test the new version soon when it is live
It's included in 3.46.0-beta.2 and you should get this version when you run "Install" in unity for example