Sign in to follow this  
lucky6969b

Question on pathfinding source code

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this