Trying to make the character object go to either a front or a back layer in relation to the walls/roof in the top down perspective of my game; to give the illusion that the characters are actually "in front of" or "behind" these walls - something pretty necessary for such kind of game.
However, I don't know if I understood the tiles expressions from the Tilemap object right, but IMO they seem to be rather limited in terms of precision and control of WHICH tiles you're picking in relation to some object's position.
Here's when the player is behind the wall, working properly:
However, things change when he's in front of it. His head will get underneath the front wall until he crosses through like half of it (2 32x32 tiles height wall).
Here's when his head will appear underneath it:
(AnimationSprites is the family of all character sprites)
I'd like to know a way to sort it out in a way that this "effect" doesn't happens; as it's (in my knowledge) because the SnapY function will choose only the nearest tile Y avaliable, and not take X into account.
Already tried dozens of different combinations of the PositionToTileX,Y, TileToPosition expression and so on; so far no good.
I mean, if there's a way, that is. If there's not then I'd like to request a more precise way to pick tiles based on a X,Y point.
And here's when it actually gets in front of it (halfway through the wall's height)
The event block used to sort it out: