Sorting layers with tilemaps not working correctly

I’ve been trying to create a top down 2d game, but the sorting layers have been tough. The farthest I could get was getting the sprites to sort correctly, but the walls having their “pivot” in their center. In the given image, you can see how my walls are treating their middle the way I’d like their bottom to be treated.

Walls are all made of tiles and are on the same sorting layer as the player (scene objects, 0).

Transparency sort mode:
Screenshot 2024-10-26 194459

I have no idea what to do, I’ve been parsing the net for the pas 5 hours to no avail.

Both the characters and the walls need their pivot points low. This is the pivot point set on the texture / Sprite Editor.

Characters need it by their feet. On the Sprite Renderer for the character, you need the Sort Point set to Pivot mode, not Center mode. You may need a parent SortingGroup if characters are composed of multiple sprites.

The walls need their pivot point at the base of the wall. This could be at their exact bottom or slightly up from that depending on what you’re going for.

Pivot points sort against pivot points when renderers have the same Sorting Layer and Order in Layer.

So I have the pivot points for my characters working, but how would I change a tilemaps pivot?

The Tilemap Renderer needs to be set to Individual Mode to get each sprite on the Tilemap to sort individually (against other sprites, against Sprite Renderers).

The wall sprites themselves need their pivot point set on the texture through the Sprite Editor.

Unfortunately, when I tried that, the player would end up rendering in between them.

What I’m looking for is to treat the walls as a single object.

Use colliders and/or pathfinding to prevent getting guys from going in the wrong spots.

Not like that, I mean when they go behind walls, they’ll have part of their body visible and another part invisible. Looks as if they are being cut in half

Usually that’s what you want though? Pics/video would help to understand what exactly you’re seeing.

Make sure there’s nothing very odd like the Tilemap is not in the right 3D space. It might help to recreate the scene to ensure you don’t have some accidental thing like that.

I’m sorry for the delay, but my unity project won’t open for some reason. What’s more, the game jam this was for has ended. I’ll try to get my project up again so I can fix the issue.

Illustration of individual tiles wall clipping:

As you can see in the masterpiece, when the wall renders individually, the player will render infront of some tiles and behind others.