Adding variations in the path.[suggestion]
Closed this issue · 2 comments
Carnaux commented
The path between two point always give the same path, maybe adding a post processing code to make variations of the path would make AI a bit more natural.
donmccurdy commented
I think natural variations for AI is probably outside the scope of this library. I'd suggest adding procedural waypoints for your AI along the way, or adding some noise to the destinations. If a character is patrolling between two fixed points, random drift in a suboptimal path is likely to look a bit unnatural too.
donmccurdy commented
For a bit more info, see http://digestingduck.blogspot.com/2010/03/simple-stupid-funnel-algorithm.html. In particular:
- A* transforms graph into a linear set of polygons which will leave you to target.
- String pulling will tell you where to towards in order to move towards target
- Locomotion/steering will be in charge of the final smooth path.
This project does (1) and (2), but it's up to your application to smooth out the final path or make it more natural.