- Home /
How can I make a bot follow a predefined path?
I want my bots to follow a predefine path. How would I do that with a script? After they have reached a certain point they will start automatically attacking, but I'm sure I can make that part myself, I just don't know how to make it so that they follow a predefined path until that point.
Besides writing your own pathfinding logic i see only two options: - animate the path. You can call functions of a script from within the unity animation editor. - use unity pathfinding.
Answer by DannyB · Oct 03, 2012 at 11:19 PM
Are you familiar with iTween?
If not, it is a free plugin with great abilities, including some nice path related utilities. One of the features allows you to attach an object to a path, which is exactly what you want as I understand.
Take a look at the Examples Page, look for the path related examples (there are a few).
Your answer
![](https://koobas.hobune.stream/wayback/20220613081807im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Recommendations for a script/plugin for creating set, curved paths 2 Answers
GameObjects following dynamic Path 1 Answer
MoveTowards on paths, different speeds 1 Answer
how to make an AI based enemy? 1 Answer
How to snap objects to path? 0 Answers