Some bounding boxes don't move on: center (pivot:above) #1018
Answered
by
donmccurdy
bigrig2212
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
donmccurdy
Jul 9, 2023
Replies: 1 comment 10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If GPU instancing is baked into the file, then each batch of meshes (e.g. all identical trains are one batch) is represented as a single node in the scene. Bounding boxes and picking are a viewer/engine concepts — not inherent in the file. You can certainly implement bounding boxes and picking for files with GPU instancing, but I don't know how/if the Babylon.js sandbox viewer handles this.
It's also possible to skip baking instancing into the file, but still allocate GPU instances at runtime instead. If you're using React Three Fiber (https://github.com/pmndrs/react-three-fiber) then I think it has some tools to automate that, or you can write the code to create instances. Doesn't have t…