# How to zoom in to loaded model's bounds

**URL:** <https://forum.babylonjs.com/t/how-to-zoom-in-to-loaded-models-bounds/8214>\
**Category:** Questions\
**Created:** [January 23, 2020, 8:26pm UTC](https://forum.babylonjs.com/t/how-to-zoom-in-to-loaded-models-bounds/8214 "2020-01-23T20:26:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EvilTwinsNiceBrother](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EvilTwinsNiceBrother](https://forum.babylonjs.com/u/EvilTwinsNiceBrother)\
**Post date:** [January 23, 2020, 8:26pm UTC](https://forum.babylonjs.com/t/how-to-zoom-in-to-loaded-models-bounds/8214/1 "2020-01-23T20:26:05Z")

</div>

Hello,  
sorry if this is a silly question but I am quite new to BabylonJS and a bit swamped with questions.  
I would like to create a simple App that is able to load models ( obj and glts ).  
Now all works fine except that some models are much larger than others.  
I would like to tell the camera to zoom the model to its bounding box or scale the model to a fixed size.  
I have used camera.setTarget sucessfully to focus on the target, but how can I get a zoom to the bounding box?  
Thanks a lot.

---

<div class="post-metadata">

**Author:** ![kvasss](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kvasss/32/3774_2.png) [@kvasss](https://forum.babylonjs.com/u/kvasss)\
**Post date:** [January 23, 2020, 9:21pm UTC](https://forum.babylonjs.com/t/how-to-zoom-in-to-loaded-models-bounds/8214/2 "2020-01-23T21:21:50Z")

</div>

hi you can get mesh size mesh.getBoundingInfo() and use camera.radius property for set distance from camera to target but if you target fixed on mesh your camera move to new radius distance. and you can use camera behaviors for smooth animation camera movements. but if you use free camera you need set camera position because this type of camera don’t have target and radius property

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [January 24, 2020, 12:47am UTC](https://forum.babylonjs.com/t/how-to-zoom-in-to-loaded-models-bounds/8214/3 "2020-01-24T00:47:47Z")

</div>

createDefaultEnvironment does this for you [https://www.babylonjs-playground.com/#8IMNBM#1](https://www.babylonjs-playground.com/#8IMNBM#1)

Other PG examples [Available Meshes to Import - Babylon.js Documentation](https://doc.babylonjs.com/resources/meshes_to_load)

---

<div class="post-metadata">

**Author:** ![EvilTwinsNiceBrother](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EvilTwinsNiceBrother](https://forum.babylonjs.com/u/EvilTwinsNiceBrother)\
**Post date:** [January 28, 2020, 11:35am UTC](https://forum.babylonjs.com/t/how-to-zoom-in-to-loaded-models-bounds/8214/4 "2020-01-28T11:35:21Z")

</div>

thanks a lot!
