Get Ortho Camera to FrameMeshes in the Scene

https://playground.babylonjs.com/#GCRJY6#1

I have a setup that is very close to what I need, I just have to figure out a way to calculate trying to frame the meshes in the frustum with the zoom only and if its too big just to go to the zoom limit.

Its really really close, but my math is off somewhere or I have not established a correct relationship yet.

To do it with a normal camera is EZPZ
https://www.babylonjs-playground.com/#P6JAWE#10

but to do it with a ORTHO im struggling.

should the ortho postions (top bottom…) not simply match with the bounding box ?

I’ll try that!

1 Like

No that wont work with the setup, the ortho is not straight on its at a 45 deg angle.

https://playground.babylonjs.com/#GCRJY6#3

this is kinda close but does not seem to really work.

Basically is an isometric view.