drei icon indicating copy to clipboard operation
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.

Open ximudada1996 opened this issue 3 years ago • 1 comments

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.

ximudada1996 avatar Jul 29 '22 10:07 ximudada1996

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.

louisjmorgan avatar Aug 09 '22 12:08 louisjmorgan