GridBasedMovement with AStar or Array or...

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

Hey guys,

I want to move between cells/waypoints/coordinates on a grid or path:


The player starts on the red point and with just one Input: Input.is_action_pressed(“ui_right”) he automatically goes along the blue points to the next red point and stops. Input"down", he goes downwards and stops on the next, “up” or “right” to the next one and back and so on…

Do I have to use pathfinding with AStar?

Or an Array? like: [0,1,2]
0 = Obsticle
1 = stoppingcell
2 = walkingcell

Start at 1 and get next point 1…
0-0-0-0-0-0-2-0 and so on…

Do you have any ideas or examples, a link or any description?

Thank you so much :slight_smile: