Mouse position

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: 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.

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