x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Procedurally alter path cost ?

Hi guys,

I was watching the last Training Stream Making Game Ready AI part 10 (https://forums.unrealengine.com/showthread.php?101781-Training-Stream-Making-Game-Ready-AI-part-10-March-1st-2016) and I am very interested in the question that @kamrann 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 :( ) 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 !! :)

PD: Sorry for my english :S

Best regards

Product Version: UE 4.10
Tags:
more ▼

asked Mar 21 '16 at 02:33 PM in C++ Programming

avatar image

nan2cc
507 23 14 38

avatar image nan2cc Mar 22 '16 at 10:53 PM

bump, bump ...

avatar image nan2cc Mar 24 '16 at 10:19 PM

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

avatar image nan2cc Mar 27 '16 at 08:31 PM

Yes Bruno, I have seen it and I have been doing some test, but nothing :( 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 :( 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 :).

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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! https://forums.unrealengine.com/showthread.php?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=350702&viewfull=1#post350702

Rama

more ▼

answered Apr 12 '16 at 10:05 AM

avatar image

Rama
10.6k 446 346 1088

avatar image nan2cc Jul 27 '16 at 09:12 PM

Hi Rama,

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 ?

https://forums.unrealengine.com/showthread.php?101781-Training-Stream-Making-Game-Ready-AI-part-10-March-1st-2016&p=571792&viewfull=1#post571792

PD: sorry for my english :S

Thanks

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question