Light Estimate error

i am getting below error

Uncaught (in promise) DOMException: Failed to execute ‘requestLightProbe’ on ‘XRSession’: Light estimation feature is not supported.

Here is the code i am using to enter XRsession.

await xrHelper.baseExperience.enterXRAsync(“immersive-ar”, “local-floor”, xrHelper.baseExperience.renderTarget);

The error report tells you exactly what you need to know - light estimation is not supported in your browser. Not sure what browser you are trying to use. check this page for more details:

you example is working is working fine , i am using One Plus Nord.

i am assuming the way i implemented the code might have issues

var xrHelper = await currentScene.createDefaultXRExperienceAsync({ disableDefaultUI: true, disableTeleportation: true,optionalFeatures: true, pointerSelectionOptions: {
enablePointerSelectionOnAllControllers: true

  1. const fm = xrHelper.baseExperience.featuresManager;
    xrHitTestModule = fm.enableFeature(WebXRHitTest, “latest”);

       // enable other features...
       //anchors = fm.enableFeature(WebXRAnchorSystem, 'latest');
    1.  var  xrSession = await xrHelper.baseExperience.enterXRAsync("immersive-ar", "unbounded", xrHelper.baseExperience.renderTarget);                                            
  2. then i am loading the model

  3. const le = xrHelper.baseExperience.featuresManager.enableFeature(BABYLON.WebXRFeatureName.LIGHT_ESTIMATION, ‘latest’, {
    // cubeMapPollInterval: 1000,
    createDirectionalLightSource: true,
    // reflectionFormat: ‘srgba8’,
    // disableCubeMapReflection: true

at this point i am getting error.

is there some wrong i am doing…

you need to enable the feature before starting the session, otherwise the feature will not be available. I would personally also remove the optionalFeatures: true, but that’s not a must.

One more question i have,

how to enable or disable in run time light estimation.

WebXR features cannot be turned off during runtime. You can disable the light generated, if that helps.

can you disable the light generated…

why, yes, it is a babylon light after all :slight_smile:

Hello just checking in, was your question answered? @Krishna_Kishore