About mesh positions and sizes in gltf files

Hi everyone…
I’m working with gltf files. I’m importing gltf files without any problem my scene viewing well. But when i want catch position and size; giving error.

error message is “materialName.getBoundingInfo is not a function”

I’m using this line:
var size = materialName.getBoundingInfo().boundingBox.extendSize;

And also i tryed same code in PG it’s working well…
I’m trying to find to solution since approximetly 5 hours…

I think i need some help :frowning:

getBoundingInfo() is a function of the mesh, not the material, so that is probably a good place to start.

2 Likes

It’s my mistake… Thank you…