Pathfinding in 2D side-scrolling game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Josh.9393

Hi, I’m quite new to Godot and I’ve been facing some issues for the last days, trying to implement movement in my game.

I have RTS-style controls, where you select units with the left-click and choose their destination with the right-click. However, the navigation gets a bit complicated as it’s a side-scrolling rather than a top-down view.

I followed this tutorial to implement basic pathfinding: https://www.davidepesce.com/2019/11/19/godot-tutorial-how-to-use-navigation2d-for-pathfinding/, but I’m using the tileset’s navigation rather than the navigation polygon node. The code works but I don’t think it is the right approach for my project.

The problem I am facing is that my units need to be able to walk on all sides of the tiles (walk on top, climb on the sides, etc) rather than inside it.
I played around with the navigation rectangle of my tile, but they will either walk inside the tile or not move at all.

There is no jumping mechanics so I don’t have to worry about that.

I don’t know if I’m missing something obvious but I can’t figure it out.
Any suggestions on how I should approach this or what could be a solution?

Thanks!