Not able to click on SkinnedMesh #1815
Replies: 2 comments 2 replies
-
do you have a sandbox? that would be the easiest. here's an example with a skinnedmesh with events: https://codesandbox.io/s/gltf-animations-pecl6?file=/src/Model.js the only thing that comes to mind is that that object you want events on has to have geometry for the raycaster to pierce. |
Beta Was this translation helpful? Give feedback.
-
must be the model or threejs, im sure you'll find similar issues in threes issue tracker or threejs-stackoverflow. that's where i'd look. "skinnedmesh raycasting does not work" skinnedmesh raycasting was only recently added mrdoob/three.js#19178 maybe they still have bugs but this is for certain not caused by r3f |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get onClick event from skinnedMesh object imported through gltfjsx but I cant seem to get any click event out of it. I tried importing mesh object but they work perfectly. I can actually turn the skinnedmesh into mesh and it would register clicks. But I need to be able to move the character's skeleton.
The solutions given here doesn't work for me:
https://stackoverflow.com/questions/65468681/pointer-events-not-firing-in-react-three-fiber
The only solution I can see working is #2 but I am not sure how to implement it.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions