Search the Community
Showing results for tags 'navigation'.
-
Hey, I am currently working on my AI, and I wonder what would be a good way, to make my NPC hold a specific distance to the player. In my case I need it for my AI behavior when it is using range weapons. I think a nice idea is to let the AI find a random point, which keeps a few conditions like, 10 units away from player, not outside of the map, not inside another object. But how to realise that. I would be very thankful if you can give me ideas, examples, descriptions etc.
- 2 replies
-
- navigation
- ai
-
(and 1 more)
Tagged with:
-
Ok, having done some testing I'm noticing a sort of strange behaviour with a test map I've created. Flat plane, a wedge, and a large box. The top of the wedge is connected to the box by an arch. I've created the nav mesh which looks exactly as I'd expect and allows navigation from the plane via the wedge and arch onto the box. I've set up my cam and player scripts for an isometric style view and I can click on the nav mesh and watch the player move to the specified location. All well and good. When the cursor is outside of the geometry it is a 2d cross hair suitable for clicking on any hud elements. When it is over the game geometry I make it a small globe. I then test to see if the globe location can be navigated to and if it is the globe is green else its red. Its a useful indicator of what is happening in the scene. The strange behaviour is that some sides of the box get marked as navigable when I would expect them to not be as they are vertical and have no mesh. If I click to say "go here" the player entity will try but not be able to reach final spot and be permanently in travel mode until I set a new target location. So... can anyone explain why only some walls should be navigable? I've not found anything that makes sense yet.