Navmesh not rebuilding
I am making an RTS and have entered the phase of learning the AI component so that my "citizens" can be totally autonomous (think Tropico.) I'm at the very early stages of learning the AI system now but I am able to get characters to move across the map towards a building (mesh) that I place for "construction"; however, I have noticed a hitch. When I place the building and have the AI go to the "rally point" at the front of the building, if the AI is coming from the rear of the building, he hooks and stops moving at the mesh but the Behavior Tree keeps ticking because he hasn't reached his destination. At first I thought it had to be my blueprints and/or behavior tree but have since realized that when I place a mesh into the world during runtime, the navmesh is not updating to accommodate the new mesh and therefore the AI never recalculates to go around it.
Having found a similar question, I saw that you need to turn on the Runtime Generation to "Dynamic" and I also checked the "Force Rebuild on Load" (tried without as well.) Neither of these solutions are currently working for me - the navmesh does not rebuild as would be expected. Is there a bug in the system or am I doing something wrong? Perhaps I need some sort of Recast node to run when the mesh is place or I'm missing another setting, although I've watched an Unreal Video with Ian and his works just fine with only adjusting the settings in his default.ini? I have tried this in 4.8.2 and have just upgraded to 4.8.3 but has the same effect. See my images below. Any help would be appreciated!
asked Jul 30 '15 at 07:14 AM in Blueprint Scripting
Did you set "dynamic" navmesh generation on RecastNavMesh instance on your map, or in the Project Settings? The project settings-way is the proper one. It's a know... missing feature ;)
answered Jul 30 '15 at 11:51 AM
You can enforce nav mesh refresh by adding a little location transform. Even better immediately after the location change you can reverse that change - it all happens in one frame so it wouldn't be noticed by the players.
answered May 05 '17 at 09:34 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here