Hello everyone,
Currently I am building a top-down shooter game using tilemaps, and here is how it looks like right now:
Now my problem is I want to have some “depth” feeling to the walls, because technically those walls have height. Here are some screenshots from, one of my favorite games, Nuclear Throne as inspiration:
As you can see, the “bottom” tile have some overhang, where you can’t go through it, and the “top” tile also have some overhang where you can go through it, creating an illusion of walls with height.
I thought I could achieve this by making longer tiles (64x96) and move their pivot around, and this is what they looked like in the tile palette (the bright yellow ones):
The issue is when I painted with them, the Tilemap Collider actually picked up on the extensions, and blocked me from moving into it, so I couldn’t really move “into” the wall from the top side:
I can think of a couple solutions:
-
I can make two layers where one is the wall with the tilemap collider, where only the “bottom” overhang will be present (and hence will have the Tilemap collider), and then have another layer that only paints the “top” overhangs with no collider so that the player can go through it. I think this is kind of a band-aid solution and can cause some problems down the road (what if I have a rule tile of sorts and I want them to be all connected for a pattern?)
-
have a separate “overhang” game object just with a sprite renderer, and instantiate a bunch on top of the wall tiles that should have the overhang? (I think this is also a silly solution…)
I guess what I am trying to ask it, has anyone tackled this issue before and could find a satisfactory solution? Thanks in advanced for the help!