Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ZeEndy |
How do I get mouse x and y position as different variables ? I’ve look trough the documentation and haven’t found it.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ZeEndy |
How do I get mouse x and y position as different variables ? I’ve look trough the documentation and haven’t found it.
Reply From: | solstice |
var mouse_position = get_global_mouse_position()
This returns a Vector2 of your mouse position. Then:
var mouse_position = get_global_mouse_position()
var mouse_x = mouse_position.x
var mouse_y = mouse_position.y
Thanks it worked.
ZeEndy | 2019-10-22 18:12