Replies: 1 comment
-
This answer might point you in the right direction, relevant code:
Since |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hello!
I'm quite new to both Three, R3f and drei, so this might be a silly question. But I am struggling for getting a collection of clickable segments with Segments component. Is this not supposed to work?
I have tried the above code and it is not firing the "onClick" event, so I guess that should be an answer to my question. The thing is that I don't understand why. Drei docs say that Segments is a wrapper of THREE.LineSegments, which in turn inherits from THREE.Line. But Three.Line does have a raycast method and I thought every element with a raycast method should have click events out of the box.
So can someone explain to me if I'm doing something wrong or ultimately if it is possible to bind onClick events on Segments?
Thanks in advance! :)
Beta Was this translation helpful? Give feedback.
All reactions