2D navigation, weighted tiles for 'difficult' terrain?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AJM
:warning: Old Version Published before Godot 3 was released.

I’ve been using Godot for about two weeks so far and I’m loving it. I’m putting together a small hack and slash to learn the engine and so far so good, I have a little guy moving around a tile map, avoiding obstacles and so on.

Here’s my question, I have got a tileset of which tiles contain navigation polygons for pathfinding. This works great, but I want the pathfinding to avoid moving over tiles that would be ‘difficult’ to navigate, say water tiles, or quick sand, but still have to use them if there’s no alternative path. In other path finding routines I’ve built, the tile objects can have an associated ‘weight’ which adds to the distance travelled, meaning the pathfinding will try to use a longer, but easier route.

Is this possible using the built in pathfinding?

Thank you!

I think that is still not implemented but on the developmen version you have the class AStar (for A*) that you can use instead of the nav polygon.

eons | 2016-10-10 13:49

Ok thanks, I can make do for the moment before 3.0 comes out!

AJM | 2016-10-12 00:16