mouse_entered
/mouse_exited
signals emitted for physics bodies even when hidden behind GUI overlay.
#81287
Labels
mouse_entered
/mouse_exited
signals emitted for physics bodies even when hidden behind GUI overlay.
#81287
Godot version
v4.1.beta2.official [a2575cb] and later up to 4.1.1 stable
System information
Windows 10.0.19045 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1050 (NVIDIA; 31.0.15.3713) - Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (4 Threads)
Issue description
My project use signals
mouse_entered
andmouse_exited
ofCollisionObject3D
to show some custom tooltips for 3D objects player may interact with.The issue is that with latest Godot version behavior of that signals has changed and now they are triggered for my 3D scene objects even when user is hovering over GUI overlay (that is
Controls
with mouse filter set toMOUSE_FILTER_STOP
for background, my GUI windows are justControls
not popups or real Godot windows) and object is hidden behind. That cause tooltips for 3D objects are shown on my GUI windows what is of course not desired.I think it is a bug/regression, because same thing was working fine on previous Godot versions and also I would expect old behavior based on input handling documentation which states that physics object picking is done as last step if not blocked by GUI (and some other possible processing) first.
From what I checked behavior has changed between:
v4.1.beta1.official [828ec2c] <- Here behavior is OK as I would expect
v4.1.beta2.official [a2575cb] <- From now on behavior is WRONG
Here you can see issue in my project (run with v4.1.1.stable.official [bd6af8e]):
Tooltip for "World Map" is displayed since world map object hidden under GUI overlay received
mouse_entered
signal even I believe it shouldn't in this case.Steps to reproduce
In my minimal reproduction project there is red sphere in the middle as 3D object for picking and blue rectangle covering half of the viewport as overlay GUI. In the upper right corner there is debug label showing if the red sphere is hovered or not (simply based on
mouse_entered
/mouse_exited
signals fromCollisionObject3D
).Expected behaviour is that red spehere should be hovered only when mouse is outside of the blue rectangle (and hovering visible part of sphere of course).
You can try runnig this project on v4.1.beta1.official [828ec2c] and behavior is OK, but if you run the same project on v4.1.beta2.official [a2575cb] (or later up to 4.1.1 stable) you can see that the red spehere is getting hovered even when hovering its left part hidden under GUI rectangle.
Minimal reproduction project
OverlayGUIHoveringWithPhysicsPicking.zip
The text was updated successfully, but these errors were encountered: