You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some really weird issues with instancedMesh on click. I'm pretty sure this is a r3f issue because it involves onClick. It's also a degradation - it used to work on older versions.
There are a few different conditions where the onClick prop stops functioning correctly.
If the position of all of the instances is initialized at the same place
If the meshRef.current.count is initialized at 0
In my sandbox there are a few useState(false) that have toggle buttons attached to them.
If you run the code as is - the onClick works
If you change either of the useState(false) to useState(true) then toggle that state using the buttons in the html, the onClick of the instancedMesh doesn't work.
Thanks so much for all your hard work <3
The text was updated successfully, but these errors were encountered:
I have some really weird issues with
instancedMesh
on click. I'm pretty sure this is a r3f issue because it involvesonClick
. It's also a degradation - it used to work on older versions.SANDBOX:
https://codesandbox.io/p/sandbox/instanced-vertex-colors-forked-zyjxkd?file=%2Fsrc%2FApp.js%3A15%2C44
There are a few different conditions where the
onClick
prop stops functioning correctly.meshRef.current.count
is initialized at 0In my sandbox there are a few
useState(false)
that have toggle buttons attached to them.onClick
worksuseState(false)
touseState(true)
then toggle that state using the buttons in the html, theonClick
of the instancedMesh doesn't work.Thanks so much for all your hard work <3
The text was updated successfully, but these errors were encountered: