Hi guys
Im using gdscript and trying to implement goal based path finding in 2D.
In order to do so i need to create a heat map of distances from a point(left click mouse position)
and from that, generate a vector field to tell a sprite or other what direction to move to get to the target.
Currently im generating a set of nodes arranged as a grid and getting them to check for changes in neighboring nodes.
My plan was to use that and store in each a int var for distance and vector2d for direction.
This seems to be quite cumbersome.
The calculations aren't hard but the method im using isn't very streamlined. If only I could code it with MatLab and it'd be alg lol
Can anyone suggest an approach i could take t generate a vector field on each mouse click.
Heres an example of the sort of movement im looking for expect for a single particle:
https://gamedevelopment.tutsplus.com/tutorials/understanding-goal-based-vector-field-pathfinding--gamedev-9007