Nav agent doesn't go to target
So I have a navmesh agent, and it doesn't seem to want to go to the target. I wrote an AI to go with it and that seems to be working. Normally you get a solid red line to the target, but in this case the line is dotted, way above the target and I assume this is why he doesn't go there.
Does anyone know how to fix this?
Comment
Best Answer
Answer by Safforn · Mar 02, 2016 at 02:40 PM
Well I feel like a right out idiot. When the enemies are created I assign the vector3 target location Y position as the y position of the enemy. I did this to make sure the enemy always had a target on this y position ironically enough.
So I just removed that and now it works properly.
Your answer
![](https://koobas.hobune.stream/wayback/20220612070303im_/https://answers.unity.com/themes/thub/images/avi.jpg)