A 2D A* pathfinding script that I am working on in unity…
Red box is both the path you want to go to.
Green lines is the path you need to go to reach the path.
Black box is the wall
working on to improve it…
A 2D A* pathfinding script that I am working on in unity…
Red box is both the path you want to go to.
Green lines is the path you need to go to reach the path.
Black box is the wall
working on to improve it…
Improve Version of it…
The formula is not perfect yet thus sometimes it does not work…Trying hard to solve it…
A fully workable formula of AStar without the smoothing part.Anyone who want the code for reference in making pathfinding free to pm me or email me.I will send you my copy.
Now it can scan the path and look for the path to the enemy.I have not implement the walking part as I still feel that it can still be improve.Hope I can make a big update to this project in my next post…
Now the script can work on mobile platform too!Cheers!
Added the smoothing part!
Now left the moving part…
Another screenshot of my progress and the improve formula of the pathfinding…
cheers!
Hope to improve the pathfinding even more…
Can you share your pathfinding script?