Tile based movement script that can collide?

What I’m trying to accomplish is a script that makes the character move in a tile based manner, similar to that of the original Legend of Zelda. I don’t want the character to be able to move into a space where there is already something there with a collider, say a wall. Think of how Link can’t move into a space where there is a rock or something.

To better elaborate, if there is nothing to the character’s right, it can move right. But, if there is something to his right, he can’t move to the right. I’ll provide a link to an image that better illustrates that.

I’ve looked online through multiple tutorials but they just handle the movement and not any obstacles that may be in the way. Thank you

Link to the image - Imgur: The magic of the Internet

I don‘t really understand what you are trying to do. Is you‘r game tile based? You could try out raycasting.

So, all of your objects have colliders? Then try to mark “not obstacles” as “Is Trigger” in inspector.