Hi , I am trying to add camera in the angular app with babylonjs . but it is always taking the default camera . I’m not able to set the camera.
initial Camera setup
Trying to change the camera conditionally but its not working!!
Any suggestion ?
Hi , I am trying to add camera in the angular app with babylonjs . but it is always taking the default camera . I’m not able to set the camera.
initial Camera setup
Maybe you could share your code in the playground, which would be easier for you to help.
In your code I don’t see anything that allows you to define the camera that must be active.
Try adding this in your selectedKey conditions :
this.scene.activeCamera = this.camera;
you will need to dispose the old camera (important to prevent mem leaks), and set the new one to be the activeCamera. You are already attaching the new camera, so that’s good.