Unable to get vertices of mesh's Boundin box

I wanted to get all vertices of Bounding box of a mesh. i used the vectorWorld property but it provides me vector3 array with all elements containing the center points of that mesh. Can someone help me with this situation??

EDIT: I am working on a project which requires snapping of two meshes, and to snap them i need all the 8 vertices of Bounding mesh. So i used vectorWorld property of getBoundingInfo() method.

But instead of returning 8 different coordinates it is returning 8 coordinates pointing to the center of that mesh.

I am totally not sure what you are trying to do :slight_smile:

you can normally deduce them all from boundingBox.minWorld and maxWorld ?

1 Like

Hi @KachaBadam please provide an example of how you tried to solve finding the bounding box vertices in a playground.


@sebavan i have added some more info regarding the current situation. I hope now you might get what i problem i am facing. please let me know if i am not able to explain the issue :sweat_smile:

i am sharing the issue what i am facing:

someMesh.position (suppose it is returning e as vertices and it’s coordinate is (0,0,0))

someMesh.getBoundingInfo().boundingBox.vectorsWorld; (then it is returning [e,e,e,e,e,e,e,e] where each e is(0,0,0) )

i hope you will understand what i am exactly facing. :sweat_smile:

It works in this playground Babylon.js Playground please produce a reproduction of your problem in a playground or other source if that is not possible.


Hello @KachaBadam just checking in if you still need help