Advertisement

Question on pathfinding source code

Started by December 14, 2010 12:06 AM
0 comments, last by Dawoodoz 13 years, 9 months ago
http://www.gamasutra.com/view/feature/3096/toward_more_realistic_pathfinding.php

@the function SmoothPath, I have the following question:

I don't understand why as lineSeg is returned from ComputeRoute1 or ComputeRoute2
it isn't stored anywhere. And just the direction is stored. So the path rendered is blank. I understand there is a function CalcVector available to calculate the current point so that I can re-construct the smoothed path. But the result isn't still what I expected. Could anyone kindly what the function smoothpath and its related functions do. Please bear with me if this posting doesn't look right. Thanks in advance

Note: I couldn't post source code as there is something wrong with the server
Jack

[Edited by - lucky6969b on December 14, 2010 12:28:35 AM]
I don't understand the implementation but I have made my own smoothing by only allowing the unit to turn within a maximum RPM. When they are a half tile from the goal, they start to turn to the next goal.

This topic is closed to new replies.

Advertisement