- Home /
Enemy using NavMeshAgent teleporting at game start
Say hello to Straton, the highlighted model (downloaded him from the asset store)
http://i.imgur.com/blUsyQN.png
Now say hello to Straton after the play button is clicked (he's in a building, not where he should be)
http://i.imgur.com/40ENrJU.png
I have a baked navigation mesh (you can see Straton again, this is when the game is not in play mode) and as you can see, Straton should be quite happily nestled on it when the play button is pressed.
http://i.imgur.com/zi1031M.png
I've been testing this on just a flat plane with a house sort of slapped in the middle for reference and it all worked perfectly fine, Straton would follow the player and nothing weird would happen such as him teleporting on top of the house. It's only when I decided to start testing it in a more game like setting that this started. Also to note, if I comment out the line nav.SetDestination (player.position); then Straton is where he should be, but he doesn't walk.... obviously. So, is there something different that I have to do when not using a flat surface?
Update: I went through all the buildings and turned off the Navigation Static option, so now Straton has no choice but to spawn on the ground!!!! However this is really not ideal because I want to be able to move around inside buildings, and have the enemies follow the player inside..... so I'm still eager to hear peoples thoughts about what might be happening.....
Hello Straton!
@Dark_Tiger do you have offmesh links in your navmesh?
Off$$anonymous$$eshLink Generation is selected in the bake settings, so, I'm gonna say yes
Your answer
![](https://koobas.hobune.stream/wayback/20220613170129im_/https://answers.unity.com/themes/thub/images/avi.jpg)