A* Pathfinding Project

Using A* in a level that is spawned in on an AR plane


#1

Hello everyone,
im trying to make an AR Tower defense game, for this it is needed to select a plane on wich the level will spawn (a table, etc.), as soon as the level has spawned the characters will spawn and should follow the nodes (wich are child objects of the tiles on the grid)

sadly it seems like the nodes dont act like they are a child of the level prefab and are in their original position in the world space. But that is only happening when i actually build it in the AR environment on a phone where the map is spawned at runtime This causes my characters to walk the shape of the path but not on the path itself.

i hope someone can help me.


#2

Hi

For a point graph, you will need to rescan the graph if you move any of the node GameObjects. You can do this by calling

AstarPath.active.Scan();

#3

thankyou very much for the fast response, i will try it right now!


#4

it worked very well thankyou!