Replies: 1 comment
-
i think its better you calculate the data yourself. i was trying to help but im not even sure how unprojectedPoint should work because it's highly specific. threejs vector3 has project/unproject functions, you can use them to project points onto a plane. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I have been playing with r3f and came across the example Lines.js. I checked the internal of function
useDrag
as linked :If I understand correctly, the
onDrag
was passed as a callback function arguments in functionuseDrag()
, whichonDrag
takes in theevent.unprojectPoint
as arguments. However, what troubles me is that theconsole.debug(event.unprojectedPoint)
is partially correct, meaning:For e.g: the line is moving in XY plane, the EndPoint position of X and Y after dragged are correct, but not the Z axis, where it always teleport to -499.050 in value. Is it because there isn't declarative function that specify the Z value?
Beta Was this translation helpful? Give feedback.
All reactions