- Home /
Проблема не воспроизводится или устарела
Enemy stops when player on higher place
Hello all. I am making a simple 3D shooter as tutorial project. I create an enemy, and add to it a NavMeshAgent and standart AI Character Control script, then set player as target to AI Character Control. While enemy is alone, all works fine, it chase player as I want, if I jump on higher place, it starts to run around that place. Then I add another enemy (a copy of first). And here is a problem. While I'm on same surface with enemies, all works fine, they chase me. But when I jump on a higher place (on a box, for example), enemies stop moving. Why they stops and how to fix this?
Answer by ZeN12 · Jul 18, 2017 at 08:03 AM
Enemies move along the NavMesh, if you jump on box (where is no NavMesh), enemy can go in wrong direction. Try to find how to add box to a nav mesh.
Please check this tutorial: https://www.youtube.com/watch?v=w3-sSozYph4
No, that's not it. I already made an Off$$anonymous$$esh Links, and on a top of the box Nav$$anonymous$$esh already exist. Here is screenshot with example
Not sure why it works like this, as option you can add an if-statement. Where you check distance between player position and target position (where AI goes). And of it's too bug, just stop the AI.
Follow this Question
Related Questions
How do I get GameObjects to look at me? 2 Answers
No player is colliding with enemy even with capsule collider !!! Please me help me. 0 Answers
Weird jumpy motion of character in Navigation Fundamentals proect 0 Answers
Roll-A-Ball enemyball[Personal Extra] Cant get it to follow the player 2 Answers
How to make an enemy stop and start movement in a tower defence game? 0 Answers