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"

[Closed] Limit NavLinkProxy to certain Agents

How would I limit a nav link proxy which is using my custom Area Class to a certain AI agent?

I've added another Supported Agent to the DefaultEngine config, which I set on the Nav Link, but I don't understand how I associate a particular agent with that Supported Agent entry.

I also saw that you can place volumes which will exclude areas, but I'd definitely prefer not to have to place both the nav links and the volumes.

Thanks!

Product Version: Not Selected
Tags:
more ▼

asked Jun 18 '16 at 06:56 PM in Using UE4

avatar image

Answers.Archive STAFF
1.9k 197 306 679

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

The question has been closed Jun 18 '16 at 07:00 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Sorry for delayed response.

You can't do it directly in navlink proxy, but each navigation area have SupportedAgents property. If you set up a link with an area that supports only agent A, it won't be created on agent B's navmesh.

NavModifier volumes follow the same principle: area will be created on navmesh only if area allows it. Otherwise modifier will be ignored.

more ▼

answered Jun 18 '16 at 06:56 PM

avatar image

Answers.Archive STAFF
1.9k 197 306 679

avatar image Answers.Archive STAFF Jun 18 '16 at 06:56 PM

OK, but I'm still confused as to how I match a particular agent (my custom Bot) to a particular Supported Agent entry. Does that make sense, or am I not understanding how it should work?

avatar image Answers.Archive STAFF Jun 18 '16 at 06:56 PM

Sorry, I misunderstood you. If you want to limit area/navlink usage in pathfinding for single/group of AIs, it's best to use navigation filters.

  1. Make area unwalkable by default in c++ constructor (e.g. DefaultCost set to DT_UNWALKABLE_POLY_COST = FLT_MAX)

  2. Make new NavigationQueryFilter (native or blueprint) and set TravelCostOverride to some value (e.g. default = 1)

  3. Use this filter for AI's move requests, either as a parameter in move task or directly in AIController by overriding PreparePathfinding() to modify returned Query.QueryFilter.

Alternatively you can have area walkable for everyone and unwalkable with filter, or use AreaFlags instead of costs.

avatar image Answers.Archive STAFF Jun 18 '16 at 06:56 PM

Thanks for the response Lukasz, it sounds like that's what I need. Haven't had a chance to implement it yet, but I'll let you know how it goes.

avatar image Answers.Archive STAFF Jun 18 '16 at 06:56 PM

That worked great by the way. Ended up doing it in PreparePathfinding. Thanks again!

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

Follow this question

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

Answers to this question