threlte icon indicating copy to clipboard operation
threlte copied to clipboard

Gizmo click detection is off by a constant

Open MattFerraro opened this issue 6 months ago • 2 comments

I have a Gizmo on a page that includes an app bar and a tool bar:

Screenshot 2023-12-30 at 10 16 38 AM

When I click on the X, -X, Z, -Y, buttons, the Gizmo does not respond. It behaves as though it is not receiving mouse clicks.

BUT, when I press the Y button, the camera moves to -Y. After some experimentation I found that the gizmo is receiving click events from the following locations:

Screenshot 2023-12-30 at 10 16 38 AM

So I suspect there's a hardcoded assumption somewhere that the <Canvas> extends to the top of the viewport.

MattFerraro avatar Dec 30 '23 15:12 MattFerraro

Digging in a bit, the assumption seems to be made on this line

I'll see if I can make a patch!

MattFerraro avatar Dec 30 '23 16:12 MattFerraro

PR is here: https://github.com/threlte/threlte/pull/810

MattFerraro avatar Dec 31 '23 05:12 MattFerraro