0 votes

Hey guys,

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

Example
https://imgur.com/a/n6bIKK9

The player starts on the red point and with just one Input: Input.isactionpressed("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-0-0
0-1-2-2-2-0-0-0
0-0-0-0-2-2-1-0
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 :)

in Engine by (20 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories