@aep.stmik answer is correct. You should be getting mouse coordinates in your gui script. What happesn if you pprint(action) in on_input() while moving the mouse?
The problem is on_input does not seem to be called at all when I move my mouse, just when I type keys that I already specified in the game.input_binding,
so when I do:
pprint(action)
Nothing happens when I hover the mouse, only when I type a key, and when I do so, this is what I get:
DEBUG:SCRIPT:
{
value = 1,
repeated = false,
released = false,
pressed = false,
}
In order to get mouse/touch events you need to create a binding for MOUSE_BUTTON_1/MOUSE_BUTTON_LEFT. Once you have this input binding you’ll start receiving mouse/touch events.
Thanks a lot that worked, it would be nice to have a more straightforward way of accessing mouse position than having to add mouse button events but this is just fine for now