I have recently acquired the Pro version of the A* Pathfinding Project and have successfully integrated it into my project, however, I am stuck on what I believe is something simple but I just cant find. I have tried to research this via the A* project documentation online as well as video tutorial that might point me in the right direction.
I am designing a 3D tile placement, hex tile strategy game that implements movement in the placed hex tiles which might resemble Civilization 6 (at least that’s the intent with the way troops move along the tiles) here are some snapshots for context:
I have implemented the Hex Graph successfully and it updates accurately with each newly placed island of tiles:
The unit moves along the indicated hex nodes perfectly:
With 1 exception… he simply slides from 1 node to another. For the life of me I cannot find how to get a walk animation to jive with the A* code.
In spoken logic, what I need is simply:
"when I click on your end node, first face the direction of the next node you are moving toward, set the animation to run or walk while you are in route, upon reaching the end node, set the animation back to idle.
This seems so simple but when I read the TurnBasedManager script I don’t understand which part of code returns:
a - The path of Vector 3’s (or node centers) created between the unit’s position and the mouse position
(or rather the end node that I clicked on)
b - How to reference “while I am moving along the intended path”
c- Face the direction of the next node along the path (not the end node)
If I can figure out how to refence the intended path I feel like I can also come up with a mouse over forecast of the path (much like a gizmo but during runtime) so the player knows the path the AI intends to take in order to reach the end node.
All tutorials seem to talk about is Navmesh and using Navmesh agents, character controllers etc. but when I tried to implement Navmesh it broke the A* hex navigation and the unit would no longer move along the path correctly.
Hope someone can help out.