| PathEngine home | previous: | next: |
The geometric shortest path will usually contain sharp corners.
We can eliminate these by post processing the path with the
generateCurvedPath() method.
We do this with the following modification immediately after finding a path:
iPath* base_path = agent->findShortestPathTo(context,target);
if(base_path)
{
path = agent->generateCurvedPath(base_path,context,0,0,20,0.3f,0.4f);
delete base_path;
}
|
(And a similar modification for paths away.)
See
| Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEngine | next: |