Configuration of WebXR and functionality

i’am new in webxr and i don’t understand much.
i try in my cellphone the next example
https://www.babylonjs-playground.com/#F41V6N

i donwload it, in the example works perfectly but in my own server not works.
i don’t know why because i don’t move nothing…

the next is the code donwload

 var createScene = async function () {
    
        var scene = new BABYLON.Scene(engine);
        var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene);
        camera.setTarget(BABYLON.Vector3.Zero());
        camera.attachControl(canvas, true);
        var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
        light.intensity = 0.7;
        var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene);
        sphere.position.y = 1;
    
        const env = scene.createDefaultEnvironment();
    
        const xr = await scene.createDefaultXRExperienceAsync({
            floorMeshes: [env.ground]
        });
    
        return scene;
    };

thanks and i hope some one can help me

i solved, que WebXR needs a secure server. only with https works fine.
thanks

3 Likes