Procedurally alter path cost?

Hi guys,

I was watching the last Training Stream Making Game Ready AI part 10 (Training Stream - Making Game Ready AI, part 10 - March 1st, 2016 - Announcements - Epic Developer Community Forums) and I am very interested in the question that @ did.

Is it possible to procedurally alter path cost, so that pathing choice can be affected based on dynamic agent/world state?

@mieszko say that it is possible in C++, he mention something like Path Query Filter (I think that was the name of the class that he mention, my english is not very good :frowning: ) but i can’t find that class, the more similar class that I find is NavigationQueryFilter.h. URecastFilter_UseDefaultArea extend from that class and URecastFilter_UseDefaultArea is one of the filter class that you can use for example in the Move to BT Task.

FNavigationQueryFilter implement INavigationQueryFilterInterface that has some virtual function like SetAreaCost etc, they seem to be what I’m looking for but i am not completely sure about that or how exactly use it.

Please, someone can point me in the right direction, at least the class/function that I need to override in order to procedurally alter path cost. If you can give me at least, and general sample will be great !! :slight_smile:

PD: Sorry for my english :S

Best regards

bump, bump …

no one can point me in the right direction ? :frowning:

Did you see this?

Yes , I have seen it and I have been doing some test, but nothing :frowning:
I think that I need to implement a custom NavigationQueryFilter and use that Filter in my Move To task, but I don’t understand how it work and how implement it, which function I need to override ? exactly what I need to put in the overridden version etc :frowning:
All the comments that I see are something like. “You need to extend from X class” or “You need to use QueryFilters”. But is super confused for me, an more clear example will be very appreciated :).

#Yes

Yes you absolutely can do this!

I had to write a BP node to encapsulate and expose the required C++ code.

I explain everything in a demo project that I created that shows this!

Nav Modifier Volumes and Nav Query Filters, BP Node For You!

Hi ,

Sorry for the really late reply. I have been busy with another things all this months, but now I am on this again. I have been checking your link, but I think that solution is not enough for my case. I have been discussing this on the forum. To avoid duplicate this discussion, do you can check the following link please ?

PD: sorry for my english :S

Thanks