I need to boot the entire model got completely into the viewport. Because if the model has a large size, it does not got completely into the viewport, for example:
To solve this problem I need set the desired camera position:
camera.setPosition( new BABYLON.Vector3(216, 93, -17) );
for example: test page
How do I automatically calculate the coordinates of the camera in which the model will got completely into the viewport?
You can set:
camera.parent = yourMesh;
Then you can change: camera.position
like you want
But note that: the camera is parent so the position is relative to his parent!
So you can't simply use your vector: (216, 93, -17)