Closed vishalamidala closed 2 years ago
The VR Experience Helper is using a deprecated API. You should instead be using Web XR: https://doc.babylonjs.com/divingDeeper/webXR/introToWebXR
There is currently no declarative support, so you'll need to write an imperative one. You can get some ideas from this repository, which I used when adding XR DOM overlay support to babylon.js.
Thanks for the help! The below XrExperience component is working for me
export const XrExperience = () => { const scene = useScene(); React.useEffect(() => { const xrExperience = async () => { await scene?.createDefaultXRExperienceAsync({ uiOptions: { sessionMode: 'immersive-vr', }, }); }; xrExperience(); }); return <></>; };
I'm still learning and i was able to enter into immersive mode and is working This is my demo learning project with boxes to click and play a different animations of character...."https://luffy-xi.vercel.app/". and I'm looking forward to create a more complex app and explore babylonjs library :)
Thank-you for following up - I will make sure to add to the new docs!
Hi, I'm new to react-babylonjs and i follwed https://brianzinn.github.io/react-babylonjs/?path=/story/vr--simple-vr and i've react typescript project, and the prop teleportEnvironmentGround does not exists on vrExperienceHelper and immersive mode does not work on oculus 2.
Please help me with issue thanks in advance!