Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,403

Navigation Win


Josh

2,679 views

 Share

I fixed our AI navigation problems and got pathfinding to work using navmeshes. Now you can easily make a horde of zombies chase after the player without setting up any waypoints. Which is the whole point of this, of course.

 

The problem had to do with a polygon filter, and I am still not sure what is going on, so I disabled it for now.

 

 Share

8 Comments


Recommended Comments

That's a function of the player radius. It chooses the shortest path, so the player will come very close to corners when they go around them. The scale of the obstacles in this test scene is quite big, so the player radius is very small in comparison.

Link to comment

Does it also support detours, so the enemy AI can not be predicted so easily? I saw in your code at the end of the video that you set an array on weights to 1.0f, so maybe one could set "wrong" weights to simulate a detour? For example when the shortest path is full of sentry guns and traps, a detour with smaller weights would make the enemy travel a safer path.

Link to comment

Welcome in the wonderfull world of ai debugging - you can spend a lifetime with this. :)

 

I actually cant say anything about it so far ... but the shortest path aint always the smartest however - will work for zombies ( see you = yummy yummy) but soldiers etc. might move perpendicular to the player movement while they are still hidden to the player ... well, dont know how to describe in english - i mean approaching tactical.

 

PS: iam a fan of building the node graph from the polygon center of the navmesh however. Still the same area but lowers the need of tweaking the agents radius to not get stuck. But its used the way it is because its way more optimal performance wise i guess.

 

nice work anyways so far. :)

Link to comment

What if I target an destination that is offset from player position (it would need to be determined if it's legal and sensible), then it would look like it's constantly trying to flank the player?

Link to comment

right - i just mean that in old school games if the designer throws enemy at the player the player got used to look right behind him/Her because yesterday`s ai might do walk just in straight lines ...

by offsetting the approach, the player is challenged to pay more attention to the surroundings, enemy behavior he already has experienced etc.

Link to comment

... and they are harder to hit e.g. one bullet three hits :)

 

But thats for what group leaders are good for - the grunts do move relative to the leader.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...