drei
drei copied to clipboard
About <View /> The mouse parameter in the call to useFrame is 0 in the View component, and any element onClick in the View component cannot be responded to.
As the title says,
The mouse parameter in the call to useFrame is 0 in the View component, and any element onClick in the View component cannot be responded to. But it works outside of the View component.
Have you set pointer-events: 'none' in the css for the Canvas component? I had a similar problem where my orbital controls weren't working and this fixed it. You will also need the onCreated property on Canvas to be set as in the documentation. I think the CSS should also be mentioned in the documentation, however, as it's clearly crucial to the function of View.