Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | trafel | |
Old Version | Published before Godot 3 was released. |
How do you get the mouse position relative to the scene offset and not the window offset ?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | trafel | |
Old Version | Published before Godot 3 was released. |
How do you get the mouse position relative to the scene offset and not the window offset ?
Reply From: | vnen |
You can use get_local_mouse_pos()
from CanvasItem
class.
Reply From: | eaglecat |
just call
get_viewport().get_mouse_pos()
for more detail
http://docs.godotengine.org/en/latest/tutorials/engine/mouse_and_input_coordinates.html