Fallen behind on the blogging this last week so here comes a few things I have done.
Path smoothing so the characters won’t walk so strange. Red line is the original path found by my path finder. Blue line is my new smoothed path. Only had time to implement step one out of two so there is still room for improvements but the path is now acceptable at least.
The method I have implemented to smooth the path is called “rubber banding”. All my triangles is my nav-mesh is bound together with it’s adjacent triangles by three edges, one for each adjacent triangle. When finding my path I am using the mid-point of those edges as the points the character moves to. When “rubber banding” my path the idea is to move the walk-point on every edge to straighten out the path. Further explanation can be found in my HowTo.