Re: [Algorithms] Knowing when I'm at the end of a path
Brought to you by:
vexxed72
From: Jason Z. <zi...@op...> - 2001-07-18 16:30:30
|
Thanks for all the great responses to this question. I didn't expect the deluge of suggestions. :) I like the idea of checking the delta distance each frame, and if its larger you have passed the waypoint. This works really well with our current system since we are getting the distance anyway, and would be easy to debug. I was hoping for a more "perfect" solution, though. If the character starts off facing the wrong direction and has to loop around it looks like every suggestion here would need special code to detect this and start checking only after the character is facing the right direction. I guess this is why we went with a simple distance in the first place, its the only method we could think of that didn't need coding for that case. But of course its better to be less zen and more robust, especially with critical pathfollowing like we are doing. Thanks again, - Jason Zisk - nFusion Interactive |