Please see the following image:


I want to be able to do what you see in the image, but inwith a single wall, that. The player should be able to walk on either side of the same object. That is, the same wall is below the hero when I go down from it, and itsit's above the hero if I come from above it. The player should be able to walk on either side of the same object.
ItsIt's like two depths in the same wall, so its not just a matter of drawing it before or after,. I could cut the object in two, but that would be the easy (and maybe computationally expensive) solution, so how do. How should I do this?