Hi all,
I'm making adventure / escape room game. I had problem with handling mouse / touch events. Seems like they always work for object that has lowest z-index. I did function for that, that is iterating through all special objects (family) I need (not many of them, like 30 maybe), and grabs one that is on top. It works fine with objects that are hidden/revealed dynamically and objects can be set to active/inactive. It works and does what I wanted, but there is problem with this approach.
I also check if touch is touching family every frame, and it eats lot of cpu.
I'm attaching event sheet screen and game screen (it serves for rotating knobs).
Oh, I tested if it's picking objects is issue, but it turns out that "is touching <family>" conditions is causing this regardless of wwhat I do there.
Maybe some of you had similar problems.