Hi, one of my objects has the behavior Ysort (the extension to set the z-order of each instance to its Y position). Visually, it works perfectly: if an instance is overlapping with another instance of the same object, you can see the one with a higher z-order on top.
The problem is when i try to interact with this object and use the condition “the cursor/touch is on object”. If two intances are overlapping, and I hover or click on them, the actions are executing for the instance with smaller z-order. I was expecting that it should recognise the instance with bigger z-order instead because if on top of the other.
is there something Im not understing correctly? or whats the proper way to make it work as I need it to?
edit to clarify: All my objects’ origin point are set to be their center bottom
The “cursor on object” doesn’t care about Z order, it checks if the cursor overlaps with the object, whether visible or not. Modifying your origin point may move the object’s boundaries, try to use the debug view (you can enable it with an action) to visualize the bounds of your object.
I see, thanks for the answer.
unfortunetly for me, modifying the origin point wont solve the problem, because some objects walk around and sometimes are going to overlap with another. If they were static I can manually make sure they dont overlap, but when they move is a bit difficult. Thanks anyway, i’ll accomodate the events so they never overlap or so.