Complete noob struggles with grid movement

Godot Version

4.6.2

Question

I’m trying to make an isometric game. I made a TileMapLayer node for the map and then a CharacterBody2D for a character node. Googling around, I found how to move the character, but not in the way that I need. Basically I want to click on a tile, and then make the character move to it. As opposed ot using arrow keys to move in all four directions.

And well…because I’m a complete newbie to Godot, I have no idea how to do that. Could someone help me out?

Kind of a big newbie project. You need isometric movement:

and you need astar pathfinding:

1 Like

You don’t need A* pathfinding. That’s WAY overcomplicated for what you are doing. You can use NavigationAgent2D and NavigationRegion2D. It’s a lot easier.

It’s really not complicated at all using astar2d node for godot. The nice thing about it is the character will walk on the tiles in orthographic directions. So, directly horizontal, directly vertical, directly diagonal, if you use it. It really depends on the look you want. Nothing wrong with the character just walking as the crow flies, but the games of that era the character walked in 4 or 6 directions. Since you are always walking center to center with each tile, it makes more sense for if something happens on the particular tile.

Maybe the navigation system can do that, I am just starting to use it right now, but it appears to just go to the next target as the crow flies. I doubt if it would be any easier to make it go from the center of a tile to the center of the next tile. Might be, though.