Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | att2018 |
Hi, all
How can I convert mouse positions to positions in 2d world ?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | att2018 |
Hi, all
How can I convert mouse positions to positions in 2d world ?
Reply From: | avencherus |
All CanvasItems should have get_global_mouse_position()
available to them.
This should return a coordinate based on the a global canvas position that it’s pointing at.
If your world origin is not positioned at (0,0), then you’ll have to add that into the result to offset it.