Skip to content

input.get_mouse_pos( )

Description

Grabs the current mouse position.

Example

mouse_x, mouse_y = input.get_mouse_pos( )
utility.println( 'x:' .. mouse_x .. ' y:' .. mouse_y )

Returns

Type Description
number x screen coordinate
number y screen coordinate