How can I convert mouse position to 2d world position?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By att2018

Hi, all
How can I convert mouse positions to positions in 2d world ?

:bust_in_silhouette: 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.