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 ( )

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

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

Thanks! I’ll check the link