+1 vote

You can get mouse position from the viewport, but how can you convert it to world position? Do I need to do it manually?

asked Jan 11, 2017 in Engine by mateusak (995 points)

1 Answer

+1 vote
Best answer

If you want the mouse coordinates relative to your canvas, each Node2D inherits from a CanvasItem and gives a method called get_global_mouse_pos().


answered Jan 11, 2017 by avencherus (4,255 points)
selected Jan 12, 2017 by mateusak
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.