Material Box

Material Box

WEB Design & Material Images

Godot - Get mouse position

Godot

GDScript code examples to get mouse position.


Mouse position in viewport display can be obtained with get_mouse_position().

var mouse_position = get_viewport().get_mouse_position()

Mouse position in global display can be obtained with get_global_mouse_position().

var mouse_position = get_global_mouse_position()

Godot

TitleGodot - Get mouse position

CategoryGodot

Created

Update

AuthorYousuke.U