[Complete Sample Project] AI Navigation ~ Create Custom Pathing Using Nav Modifiers + Query Filters

Dear Community,

I’ve created a video and a sample BP-Only project (+ my Victory Plugin) that shows you how to use Nav Modifier Volumes and Navigation Query Filters to create custom pathing for your units!

**Use Case: Electric Currents and 2 Types of Characters**

In my example, I have two types of units.

The blue unit is immune to electricity, and does not need to path around electric currents.

The red unit bids us all a fond farewell if it passes thruogh an electric current.

So in this case I can't just block of areas that have electric currents completely from the nav mesh, or else the blue unit cannot pass through freely as it should be able to, taking a shortcut as a result.

**This is a case where Nav Modifiers and Query Filters really shine!**

I only want to **filter out** certain sections of the nav mesh for the red unit, while still allowing the blue unit to pass through those areas freely.

Custom BP Node

In order to actually be able to use query filters and nav modifiers in a BP only project effectively, I made a custom BP node, AI Move To With Filter.

This node allows me to tell the unit to move to a certain location, while using a query filter, only in Blueprints!

**Changes Nav Behavior Filters  ~ Per Move ~  If You Want To!**

Using my Victory BP Library node, you can actually have a unit changes its navigation filter per move if you want to!

This enables you to have the AI respond to dynamic level conditions (like if the electricity in my example gets turned off), or if you just want the AI to confuse the player by randomly switching its pathing preferences!

Project Download Link

I’m giving you the entire project as shown in the video above, so you can poke around in hands-on fashion!

Media Fire (27 MB)

**Victory Plugin, 100+ Custom BP Nodes For You!**

If you're not familiar with all the complimentary custom nodes I am offering to you such as drawing vertices of static and skeletal meshes, tons of extra math and geometry analysis nodes, and randomization features, check out my Victory BP Library Plugin!

**Victory BP Library ~ Extra BP Nodes For you!**



This is brilliant Rama, nice work!

Lovely to hear from you n00854180t!



Love your AI stuff Rama!!
I have a bit of a struggle finding a specific path, maybe you’d fancy giving me a hint : ).

I’m trying to navigate a pawn to a volume. Thereby, the pawn shouldn’t simply walk to the volumes location (mostly its center) but find the closest path to stand inside the volume.
I’m struggling with the idea that the path may change dynamically due to other actors and whatnot.
Overriding the INavAgent for my volume doesn’t help either, I believe. Since getting the point on volume surface closest to pawn would need the pawn’s location (talking about NavGetAgentLocation()).

Any ideas? :s. (A bit closer description: Closest path to volume - Programming & Scripting - Epic Developer Community Forums).