About mesh positions and sizes in gltf files

#1

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:

0 Likes

About mesh sizes, scaling in onMeshLoaded event
#2

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

2 Likes

#3

It’s my mistake… Thank you…

0 Likes