Replies: 1 comment 4 replies
-
Can you post the code you've written (not r3f src code) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am currently working on a project that displays a 3d model of earth and 3d models of some of the satellites in orbit. I am using the useLoader hook with GLTFLoader and a GLTF from NASA to create the international space station, and passing it to a primitive object.
When I try to attach a click handler to this primitive object, i get the error "Uncaught TypeError: Cannot read property 'handlers' of undefined" when clicked. This comes from line 1001 of "@react-three/fiber/dist/react-three-fiber.esm.js".
When I click on the International Space Station, it targets a mesh on the model, but not the parent Group where the handler is located.
The function on line 1000 of @react-three/fiber/dist/react-three-fiber.esm.js looks as if it is trying to pass the focus up to the parent component, and with a quick edit to the function everything works as planned. Has anyone else ran into this issue? I am unsure if I am doing something incorrectly to achieve these results. Thank you!
before edit:
after edit:
Beta Was this translation helpful? Give feedback.
All reactions