Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

chrisnathan1983

1
Posts
1
Topics
A member registered Nov 22, 2016

Recent community posts

I haven't finished anything, but I modified the code from https://github.com/danielmccluskey/A-Star-Pathfinding-Tutorial

I created a NavManager that attaches to the grid object. At start, it searches all the tilemaps for colliders. If the tilemap has a collider, it creates a wall node where it finds a tile. I choose to not go the same approach as the original scripts which does a bunch of raycasting and physics tests; though it seems like that was a mistake, as plants aren't included as a wall node. Easy to re-implement.

Secondly, I attached a NavAgent script to the player that gets a path from the NavManager. Using the path, I send the direction to the Mover script.

It works OK, needs more work. I was really surprised with how quickly I was able to get it working from the code mentioned above. Great scripts!

Could I get some help on implementing pathfinding. After some research, it would seem that the best approach would be to modify GridManager for the A* node creation and then create a script that interacts with mover to follow the path returned. Perhaps it's a feature others would appreciate. Thanks for the amazing asset!