Mouse position when game window is resized

Hi,
On mouse inputs, action.x and action.y are enough … until the user resizes the game window.
Then, I must correct those values. Please note that I’m not using an explicit camera.
Context:

function on_input(self, action_id, action)
    if action_id == hash("bttn_1") and action.released then
        go.animate(".", "position", go.PLAYBACK_ONCE_FORWARD, vmath.vector3(action.screen_x, action.screen_y, 1), go.EASING_INOUTQUAD, 1, 0 )

I guess I must do some math involving window.get_size() … I’m not sure.

1 Like

I am facing same problem, did you solve it?

I have solved it like this: