mirror of https://github.com/godotengine/godot
Merge pull request #99771 from Sauermann/fix-physics-hover-over-embedded-window
Fix physics picking when hovering an embedded window
This commit is contained in:
commit
84bf708638
|
|
@ -682,8 +682,9 @@ void Viewport::_process_picking() {
|
|||
if (Object::cast_to<Window>(this) && Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
|
||||
return;
|
||||
}
|
||||
if (!gui.mouse_in_viewport) {
|
||||
// Clear picking events if mouse has left viewport.
|
||||
if (!gui.mouse_in_viewport || gui.subwindow_over) {
|
||||
// Clear picking events if the mouse has left the viewport or is over an embedded window.
|
||||
// These are locations, that are expected to not trigger physics picking.
|
||||
physics_picking_events.clear();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue