Thank you so much for sharing! I really appreciate it and had so much fun watching! Subscribed!
chrisnathan1983
Creator of
Recent community posts
That is really strange, I haven't been able to replicate that behavior. However, I have rewritten the wandering, so perhaps that should be fixed. I'll publish the fixes and a new level soon!
In Go Ducks, you are tasked with finding the ducks, but they move fast away from you, so it can be a challenge to find the five ducks amidst all the hens.
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!