Replies: 1 comment 2 replies
-
const [offset, set] = useState(0)
useLayoutEffect(() => {
ref.current.geometry.computeBoundingBox()
set(-ref.current.geometry.boundingBox.min.x / 2)
}, [])
return (
<group position={[offset, 0, 0}>
<mesh ref={ref} ... more or less, something like that |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How can I get the
HALF_WIDTH
of the 1st parentgroup
of myText
, so that I can center my text's 1st parentgroup
relative to the other mesh?The text center should be at the center of my cylinder:
Beta Was this translation helpful? Give feedback.
All reactions