Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | powervette |
I have a chest which is an Area2D set up to do mouse entered/exited and it works fine as long as my player is even with or below the chest, once moving above it the mouse entered/exited events stop firing. It kinda is acting like with other objects using a YSort, so I moved it out of the YSort and still the same behaviour.
Not sure what is going on
i dont understand: what do you mean with “even, below and above”? isnt this a 2D scene?
are you talking about the z_index property?
Andrea | 2021-01-05 18:55
sorry, if the player y position is above the chests y position it does not fire, if players y position is below chests then it works. Doesn’t matter x position, player can be on left edge of screen and chest on right, just as long as player y is below chest y it will fire.
powervette | 2021-01-05 19:01
understood now
first thing i can think of: the player has a “clickable” area and it is interfering with the area of the chest.
if not, you have to share parts of the code, because this is not a normal behaviour of the area2D enter/exit signal.
Andrea | 2021-01-05 19:14
Player has multiple Area2D’s, I turned off pickable just to see if that would matter, it didn’t. No clickable areas.
lots of code, not sure what to share.
powervette | 2021-01-05 19:26
wanna share the project or a reduced version of it?
Andrea | 2021-01-05 19:44
I can, but seeing as i’m pretty newbish its probably quite embarrassing.
any direct messaging here to send you a link?
powervette | 2021-01-05 19:48
dont be, being noob is the first step to became expert!
you can use google drive and put the link here, and remove it later if you wish
Andrea | 2021-01-05 19:53
link removed
powervette | 2021-01-05 19:54