How to make character navigate around navmodifiers they are blocked from ?
Apologies if this post is against the wrong topic, I couldn't see one for AI.
I have a navmodifier setup inside a navmesh, that blocks certain types (vehicles), but instead of navigating around the modifier they just but up against it "sliding long" its walls.
What I really want is for the vehicles to navigate around the navmesh modifier as if it were a building or other solid object, but the non vehicle characters to use the nav mesh volume as normal, is there a way of doing this ?
asked Sep 30 '14 at 06:32 PM in Using UE4
I think you can do this very easily using NavArea and NavigationQueryFilter :)
1. Create new blueprint from class NavArea, you can name it NavArea_CharacterOnly You can specify there some things like color of nav mesh for this area, cost of movement and so on. But you don't need to change anything there if you don't want to.
2. Create new blueprint from class NavigationQueryFilter, you can name it NavQueryFilter_Vehicle
3. Open default properties of this blueprint and add 3 new Areas: NavArea_Default, NavArea_Null and your custom NavArea created in step 1 = NavArea_CharacterOnly. For NavArea_Null and NavArea_CharacterOnly toggle checkbox "Is Excluded?" to true - this will disable navigation for these zones.
4. Place same NavModifier to your level and set Area Class in properties to your custom NavArea_CharacterOnly. Navigation mesh will change color to color of your nav area specified in blueprint of NavArea_CharacterOnly.
5. Using filters is very easy too, movement blueprint nodes like Move To Location, Move To Actor (AIController class) have input dropdown where you can select filter for navigation. Select there your custom NavigationQueryFilter_Vehicle created in step 2.
If you use a NavModifierVolume, you can change the Area Class to NavArea_Null to adjust the NavMesh around it. This will let your vehicles navigate around it instead of sliding against it. The problem, however, is that this will affect the Nav Mesh for all AI. There is not currently a way to specify different responses to the Nav Mesh, but there is work being done to allow layered Nav Meshes for separate AI types. Unfortunately we do not have a current timeline for its implementation.
For now, you may need to use Target Points or something similar and adjust the pathing of vehicles manually when they approach the area you want them to avoid.
answered Sep 30 '14 at 10:18 PM
Sorry for the delay, this is now working as Nonder said it would.
Many thanks Nonder.
answered Mar 04 '15 at 09:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here