Determine mouse position on the GraphEditor while regarding the displacement of the editor area #191
Answered
by
eckig
TrickShotMLG02
asked this question in
Q&A
-
I am trying to figure out on how to get the mouse position on the editor. However I also want to take the displacement of the editor itself into account, since it is possible to move the "drawing area" around and not start with 0,0 in the top left corner of the editor, but with something like 700,350. Is this possible in any way? |
Beta Was this translation helpful? Give feedback.
Answered by
eckig
May 21, 2024
Replies: 1 comment 2 replies
-
If I understand you correctly, this should work:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got a typo in my snippet.. updated.
But if I use this snippet on the demo app, I get the absolute coordinates (the top left is only 0,0 if pan to the top-left-most position).