Open AndrewJSchoen opened 1 month ago
it does seem to center the model correctly in the demo you made? it seems to me you expect the component with the red wireframe to re-render because you called bounds.refresh().clip().fit() but that call won't trigger any state updates, it merely refreshes internals and starts cam transforms essentially bounds works, the component shows the old bounds because it doesn't re-render
three
version:0.166.1
@react-three/fiber
version:8.16.8
@react-three/drei
version:9.108.3
node
version:v20.9.0
npm
(oryarn
) version:9.8.1
Problem description:
When using the
Bounds
component, it incorrectly ignores scaling applied to group objects (and possibly others). This applies to especially to cases where the group is scaled by reference. This results in a mismatch from the expected bounds, based on what you see in the visual.Relevant code:
https://codesandbox.io/p/devbox/bounds-gltf-y7g9xc