...Except there is no wall. Only one of its edges.
Here is what I mean. Notice how the lines "sink" into the center square.
I've been trying to do something very similar, in Unity. My approach is to detect when the lines come into contact with the center square (hexagon, in my case), and first initiate an animation that decreases the width of the lines, precisely timed via math to last exactly as long as needed.
But there's a problem. The animation doesn't play. I've spent the last few hours debugging it, to no avail, and now have finally given up, because the problem is too complex to post here. Too many variables.
Are there any better methods of achieving this?
My own, even if it had worked, wouldn't have been perfect, because the width would've decreased on both sides (of the line running in the middle of the thick squares or hexagons that are to disappear), giving it a strange, swallowing effect, but I'd be satisfied, since it's just a practice project.
So, I'm giving up on this approach. What are easier ways to do this? (Preferably in Unity, but I'll take anything.)
Hasty edit: Keep in mind that my "lines" are not sprites but line renderers, but I'm looking for ways to work on either.