March 2016
Beginner
188 pages
4h 8m
English
Now if we hit Play, we should see the AI chase you until you've broken sight!
So, the bot will route as it did previously until an enemy is within sight. If the bot is in state 0, it will enter state 1 once an enemy is detected by the AI Perception component. Next, if one of these enemies is within sight and we have no current enemy, we will change our state to 2 and set our enemy. Lastly, we will continue to move toward our enemy until we lose sight of them, resulting in us being set back to state 0. The following diagram illustrates these transitions:

This is how we create AI without the assistance of Behavior Tree. Ultimately, ...
Read now
Unlock full access