Open squabix opened 2 years ago
I am unable to replicate this issue on Linux in v4.0.beta.custom_build [e69b7083d]. Seems to be restricted to v3.x or to Mac.
Still an issue in v4.1.2 on Mac.
Could this please be looked at by someone who knows the macos platform part of Godot? It's a relatively big undocumented limitation of MacOS builds. My guess is that since warp_mouse() uses CGWarpMouseCursorPosition, which does not send any event corresponding to the (simulated) mouse movement, events should be sent manually, but I was not able to fix this.
Godot version
v3.4.1.stable.official
System information
MacBook Air
Issue description
I was working on making a controller/joystick-compatible cursor for my game to add controller support. I ended up using the function
get_viewport().warp_mouse(pos)
which correctly warps the mouse to the given position.When I was testing this out though, I noticed that buttons did not seem to respond when the mouse was moved over them. I then tried using the function
Input.warp_mouse_position(pos)
to move the mouse instead, but the same problem reoccured.In fact, no
Control
nodes seem to detect when the mouse is moved over them.Steps to reproduce
Control
node to the sceneButton
node to the scene and scale it so that it's easy to click onControl
nodeControl
node:indent the code as needed
Button
and press the shift key repeatedlyButton
, the hover animation for theButton
shouldn't playButton
and the press animation should play, but if you continue to press the shift key, the mouse will go past theButton
without the hover animation stoppingMinimal reproduction project
MouseWarpBug.zip