-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bounding Box #54
Comments
Hi, sorry this is late, could you prepare a minimally reproducible example on Glitch or something similar? Here's a starter example on Glitch. |
Hi @BrainBacon, I was not able to get it working in Glitch but I have created a reproducible example and upload it here: https://github.com/gggggbbbbb/vue-babylon-test . In this example you can clearly see how the target ArcRotate camera does not correspond with the "center" of the displayed object (calculated from its bounding box) but rather with the global origin of the STL file loaded (which could be arbitrary). |
Hello,
I would like to load assets (.stl files) uploaded by users (so the origin of the file might not coincide with the centre of the mesh object): Is there a way to calculate the Bounding Box of a mesh (or more meshes ideally) and set its center as the target for the ArcRotate camera?
In BabylonJS I would use something like:
mesh.getBoundinfo().boundingSphere.centerWorld
Thank you!
The text was updated successfully, but these errors were encountered: