1 decade ago by Clyssandre
Hello,
Could someone help with the following issue?
I have two entities overlapping each other. The smaller entity (smaller graphics) is 100% on top of the bigger one. I made sure the smaller entity has a higher zIndex. They both have a 'clicked' method defined.
When I click the smaller entity, it's the bigger entity "clicked" method that is triggered and the "clicked" method of the smaller entity is ignored.
Could someone explains this behaviour to me?
Is there a way to make the click trigger only the "clicked" method of the topmost entity ?
I found this but it's 2 years old:
http://pointofimpactjs.com/snippets/view/16/entity-click
Is it still the way to go?
Thank you for any help!
Could someone help with the following issue?
I have two entities overlapping each other. The smaller entity (smaller graphics) is 100% on top of the bigger one. I made sure the smaller entity has a higher zIndex. They both have a 'clicked' method defined.
When I click the smaller entity, it's the bigger entity "clicked" method that is triggered and the "clicked" method of the smaller entity is ignored.
Could someone explains this behaviour to me?
Is there a way to make the click trigger only the "clicked" method of the topmost entity ?
I found this but it's 2 years old:
http://pointofimpactjs.com/snippets/view/16/entity-click
Is it still the way to go?
Thank you for any help!