Issue with Seek using UCC/BD Pro/Navmesh

jkaczmar

Member
I'm having what I think is a setup problem with UCC, BD Pro, and Navmesh. I have my NPCs setup to pursue my player if they see the player or if they are shot by the player. All this works and Seek kicks off as expected. The NPC walks within range then shoots my player still as expected.

However, I can exploit the NPC in the simplest of ways by putting a 5 foot wide wall between the player and the NPC. The NPC walks to the player's position on the other side of the wall but then just walks into the wall for eternity rather than going around this simple obstacle.

I played with the Seek function in the Movement demo pack by removing your scene automation and manually moving the destination point to relatively complicated positions to trick the seek function. No matter where I move the destination point in the scene, the Seek function is smart enough to go through door ways, navigate around obstacles, etc. In that demo, the player is controlled with the simplest of trees--it's really just "Seek". Point is without UCC in the mix, the BD Pro seek function seems quite intelligent.

Any sense of what I need to tweak in my setup, likely on UCC to make this work better? I'm fairly certain it's not Navmesh related as the NPC works fine until there is something blocking it.
 
Hi, UCC agents should be able to bypass standard obstacles just like standard agents do. If you put a UCC NPC and a basic NPC (similar to the ones in the BD Movement demo) in the exact same scene with a target and a basic wall obstacle, does the UCC NPC keep walking into the wall while the basic character goes around it ?

If yes then that's very strange, but maybe there's a setup issue. Does your UCC character have the Nav Mesh Agent Movement ability ? Lastly, I can offer one screenshare to look at this for free if you need.
 
I think I figured it out. I took a version of your advice and dropped my NPC and my Player into the Movement demo scene and the NPC was able to navigate it as easily as the demo scene objects. I then went back and looked at my game scene in more detail and the issue was that I could find areas in the scene where I could "trick" the NPC into getting stuck in a Navmesh triangle where it thinks its best path forward is to just continue to walk in a straight line even if that clearly isn't the right thing for it to complete the Seek path.

My immediate fix was to put some fairly large carve holes around the large boulders that are forcing the NPC away from these Navmesh holes. This works, but because of their size and shape the carve holes are much larger than I would like. I can of course keep tweaking this to rightsize them.

However, on a related note, is there a quick and dirty BD action (either natively or in one of the packs) to tell an NPC to repath if it is stuck for too long? That would also be a good fix for the issue that I could perhaps use in tandem.
 
Back
Top