Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlapping Area3D causes rapid mouse-event triggers #90007

Open
yoont4 opened this issue Mar 29, 2024 · 0 comments
Open

Overlapping Area3D causes rapid mouse-event triggers #90007

yoont4 opened this issue Mar 29, 2024 · 0 comments

Comments

@yoont4
Copy link

yoont4 commented Mar 29, 2024

Tested versions

v4.2.1.stable.official [b09f793]

System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3090 (NVIDIA; 31.0.15.4665) - AMD Ryzen Threadripper 3970X 32-Core Processor (64 Threads)

Issue description

When Area3D nodes perfectly overlap, instead of ray-picking with a consistent "top" level component like normal, it rapidly cycles through every object every frame. This causes infrequent and hard to debug edge-cases if you're unaware of the behavior where mouse-enter/exit logic might be fired off rapidly for no reason.

This situation has appeared a few times for me when implementing 3D drag and drop in a variety of situations where nodes can overlap (i.e. path-finding from start->finish position, where multiple are sitting at the start or the end).

Proposed Behavior:
I think ideally, if the position of multiple Area3D are perfectly overlapped, it should always take the result of the first hit. I'm not sure if it's deterministic, but I think something like that would be preferred over rapidly firing mouse events every frame.

Steps to reproduce

(Repro project is attached)

  • Run repro project
  • Mouse over center of the screen where Area3D are
  • Can see mouse_enter/exit is fired rapidly

Minimal reproduction project (MRP)

Overlapping Area3D Bug Repro.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants