Skip to content
Discussion options

You must be logged in to vote

the problem with centring geometry like that is that it stacks up. i would avoid mutating geometry like that. perhaps in this case it creates geometry that the raycaster isn't able to pierce any longer. you can center an object without messing with its geometry. see dreis center or bounds components for instance.

as for geometry, these are generic threejs objects, threejs docs list all the props. you don't set a function prop, you call it. for instance in a useLayoutEffect. in react setting a function prop just overwrites a function. <...Geometry computeBoundingBox={...} /> makes little sense, you just destroy that function. instead do: geometry.current.computeBoundingBox() while geometry

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Draco112358
Comment options

@drcmda
Comment options

@Draco112358
Comment options

Answer selected by Draco112358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants