Fit camera to boundingbox

Hello! I want fit camera to mesh bounding box.

first I refer to this


but not work. ( Babylon.js Playground )
this solution only work camera is top or bottom. not side

secondly I refer to this


but not work too ( https://www.babylonjs-playground.com/#ENBXQW#1 )

how can I fit camera to mesh(or merged mesh)?

Hey!
I think this should be what you need: Apply Camera Behaviors - Babylon.js Documentation

Thanks! I’ll check the link