You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My naive expectation would be that using a DragControls within a RenderTexture, the dragged object would track the mouse's raycasted position across the surface the texture is rendered on (such as the threejs raycast texture example). Instead, it seems to map to the mouse's position across the Canvas.
It's clear to me that we need to be doing a raycast, but I'm still pretty new to threejs and 3d programming in general, so I don't really know where to start with implementing it.
The text was updated successfully, but these errors were encountered:
three
version: 0.173.0@react-three/fiber
version: 8.17.14@react-three/drei
version: 9.121.4node
version: N/A (sandbox)npm
(oryarn
) version: N/A (sandbox)Problem description:
My naive expectation would be that using a DragControls within a RenderTexture, the dragged object would track the mouse's raycasted position across the surface the texture is rendered on (such as the threejs raycast texture example). Instead, it seems to map to the mouse's position across the Canvas.
dragcontrols.within.rendertexture.2.mp4
Relevant code:
https://codesandbox.io/p/sandbox/kws3cx
Suggested solution:
It's clear to me that we need to be doing a raycast, but I'm still pretty new to threejs and 3d programming in general, so I don't really know where to start with implementing it.
The text was updated successfully, but these errors were encountered: