Sign in to follow this  

Path Following

This topic is 4840 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

Can somebody point me in the right direction to something that will teach me how to do the following? I want to have an NPC in my game follow a certain path (which I will have to program into the game) to a certain location. It isn't a best-path analysis or anything like that. Basically I want to know how to draw the path, and how to make him follow it to the location.

Share this post


Link to post
Share on other sites
Well, generally what you want to is specify several path nodes. The NPC should ideally use these path nodes, and work out how to get between himself.

The problem is simple if the path nodes always have direct line of sight to each other without obstacles -- simply have the NPC walk from one to the next, maybe rounding off the corners so it doesn't look strange.

If the NPC must actually navigate, you'll need to use a path finding algorithm. A* is a particularly popular one that you can google for lots and lots of tutorials.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes, I was thinking of giving him a specific path, so path nodes will work wonders. Thank you so much.

Share this post


Link to post
Share on other sites

This topic is 4840 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.

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