Relying on the mouse cursor outside of the actual system Window sounds like a bad idea, both technically and UX-wise. Godot can’t catch events happening outside of the window, unless the mouse is in a dragging operation (which is an actual feature of window managers).
If you want your game to run properly, the best you can do is to make the window larger or resizeable, really. That doesn’t mean you have to resize the game area: for this you can change the scaling modes if you want it to remain the same size. If you relied on OS window size in your code, then that’s also a bad idea since that assumption can easily break due to varying mobile resolutions anyways.
Other games do the same thing if you run them in window mode.
Gamemaker Studio does have that ability too
And i think godot also has that ability and ich just want to know how.
There must be an workarround
gruen | 2019-08-24 11:33
Which games do that? How would they even handle clicks outside the window? (which means the window will vanish out of focus )
It is possible to get the global mouse position on screen using OS-specific APIs, but that’s not a feature available through Godot API. Nobody needed this before.
Zylann | 2019-08-24 15:52
GTA 5 for excample.
and you cant click outsite of the window. you need to swap off with alt + tab
every game that you run in window mode disables the ability to click outsite of the screen.
there are always in nearly every game the ability to run in window mode or to run in borderless windowmode. but your cursor doesnt ever move outsite the window.
i just want the same thing. you aim in mousedirection and you should still aim in that direction if the mouse leaves the window.
it would be enough to disable the ability to leave the window.