Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Question on pathfinding source code

This topic is 2740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!