Imported Model Question

When I import a custom made model into the scene, it’s very large. Is there a way to scale the model down so that it fits the scene?

I wrote some code to scale a model to a largest dimension, which sounds like what you are after:

First you need to get the bounding info for the model:

Then you scale it accordingly:

If you make a PG with a model then we can get it scale it using that code.

edit: sorry about those bad links. I haven’t figured out how to post code like we could in the old forum.

And also worth mentioning if you just wanted the basic scaling code for every model you just imported in your .onSuccess there’s also:

newMeshes[0].scaling = new BABYLON.Vector3(0.5, 0.5, 0.5);

But Brian’s automated process is pretty nice!