godot-escoria / escoria-issues

Central Escoria issue tracker
3 stars 0 forks source link

Overlapping ESCItem detection order is random #262

Open balloonpopper opened 2 years ago

balloonpopper commented 2 years ago

Describe the bug Noticed in room 3 currently as the right platform and right door overlap covering the whole doorway. If you mouse over the doorway, sometimes it detects the platform then the door, and sometimes in the reverse order. If the doorway is detected last, then the tooltip is correct (the door) and you can interact with the door. If the doorway is detected first, you can't interact with it as the platform is the "active" object. Easily fixed by making sure 2 overlapping objects aren't both active, however having the detection order deterministic would solve this problem, and has the potential to stop future bugs. New users might create overlapping objects and get confused with the inconsistency. If the detection order is determined, at least the behavior should be consistent.

To Reproduce Create 2 overlapping ESCItems with different names and the same collision polygon (if this doesn't work, move the collision polygon of one slightly). Mouse back and forwards multiple times and you should see sometimes one item's tooltip name, and sometimes the other.

Expected behavior Deterministic ordering

Versions