What is the getBoundingInfo undefined in Playground meaning ( there isn't any error in my console)

hello everyone

I am trying to use to camera in my tiled map , one for moving on the map
(UniversalCamera) and the other one for models, and here is my PG : https://playground.babylonjs.com/#X2ULQN#52

I just add the following line of code to my PG and get the error which said that getBoundingInfo undefined , what is the problem with my PG?

// switching on double click
let switchCamera = true;
window.addEventListener("dblclick", function (evt) {
    if (switchCam) {
        scene.activeCamera = camera;
        camera.attachControl(canvas, true);
    } else {
        scene.activeCamera = camera2;
        camera2.attachControl(canvas, true);
    }
    switchCamera = !switchCamera;
})

Hello, simple fix I made. Looks like you just had a small mistake on one of the earlier lines. (forgot to put new)

camera2.target = new BABYLON.Vector3(1684550, 0, 0);

1 Like

oh sorry for my mistake, thank you so much

No problem. Sometimes it just needs as second pair of eyes :wink:

1 Like