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"

agent radius never works for my ai in 4.11

Its been hell the past 2 days trying to figure out what i am doing wrong regarding changing the agent radius of my large "monster" . I am just trying to make my monster not run into walls and not getting stuck into simple corners . The attached screenshot gives a clearer idea .

alt text

I tried modifying all sorts of checkbox and sliders in the capsulecomponent , movementcomponent and even in the project settings creating supported agents .

alt text

Changing the agent radius in the movement component never does anything . Changing the agent radius in the supported agents through the project settings will only work when the value is between 30 to 40 .

Inputting any value less than 30 or greater than 40 will no longer make the ai follow the path and just goes towards (0,0,0) vector position instead of my target player . So it apparently breaks the path if the agent radius in the supported agents is below 30 or above 40 . I need some help badly on this matter , any help and inputs regarding this problem will be great .

Product Version: UE 4.11
Tags:
monsterproblem.png (783.4 kB)
agentproblem.png (93.0 kB)
more ▼

asked May 09 '16 at 06:01 AM in Using UE4

avatar image

codehawk64
68 4 7 15

avatar image carpet200 May 12 '16 at 10:12 AM

I have the exact same problem

avatar image carbophoze Mar 09 '17 at 04:34 PM

an i'm too(

avatar image SCFDMerch Aug 16 '17 at 12:03 AM

I am also having troubles with this, it seems to be a bug in unreal 4, if seen multiple posts all saying the same thing. if anyone has an answer for this would be grateful

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

1 answer: sort voted first

I got this to work finally!

I think Unreal tries to automatically choose navmesh based on character radius and other parameters. It could be that when the radius difference get's too large it won't select the navmesh. You could probably fix it by setting the right parameters everywhere but i did not get it to work.

Instead i did "Get All Actors Of Class" and searched for the right RecastNavMesh. alt text

I used the name it was given in the world outliner to identify which RecastNavMesh to use. (would be better to use something else as ID probably, the name changes sometimes) alt text

Then i used it with the pathfinding. alt text

In Project Settings->NavigationSystem i created Agents for my different Characters with the Height and Radius i wanted. alt text

Keep in mind that it's only the first navmesh that will automaticaly be visible when pressing 'p'. To view the other navmeshes you need to select the other RecastNavMeshes in the world outliner and click 'Enable Drawing'. They will also not be visible in play mode when using the command 'show Navigation'. You need to click enable drawing on them again while in play mode to show them.

This could probably be fixed by creating a child class of RecastNavMesh and set 'Enable Drawing' to 'True' in it. You can also create an ID in the child class to be used with the "Get All Actors Of Class" function. Remember to select the new class to use for each Agent, in Project Settings->NavigationSystem (Image 4). 'Navigation Data Class' and 'Preferred Nav Data' should be your new child class (i'm not sure if both are needed, but just to be safe change both)

more ▼

answered Feb 21 '18 at 12:45 PM

avatar image

carpet200
88 3 4 7

avatar image armadillo_mole Apr 23 '19 at 05:04 PM

Underrated answer, it concisely lists and describes all the problems that will trip anyone starting out fiddling with AI and navmeshes (such as myself). None of the workarounds is readily discoverable without instructions. Even a tooltip change to notify users that the world outliner recast navmesh properties are broken (or at least not supposed to be edited at all) would help in that regard immensely.

Googling around today (2019) took me to at least 15 different questions / pages without the correct reasoning with entries between 2015 and 2018. The only way I found this question / answer was by googling "ue4 navmesh agent radius 30 39" which only happened because I already had spent time bisecting the set of valid values. It is just sad to imagine that many people will waste time rediscovering the same problem details while this answer doesn't bubble up in the google results.

avatar image armadillo_mole Apr 23 '19 at 06:12 PM

Additional data in case anyone is curious about investigating how the world outliner recast navmesh properties are broken (tested in 4.19.2):

  • Changes in the agent height property for the recast navmesh are applied ONLY AFTER you update the cell size property (values tested were 18, 19, 20 for cell size). This seems to apply only for the agent height property, since changes to the agent radius property is applied regardless of the cell size being updated or not.

  • If you change the agent height to 139 or lower, or 149 or higher, the recast navmesh stops working (needs a cell size update to take effect). 139.1 and 148.9 agent height work just fine even after updating cell size.

Maybe it's just my impression, but it seems some parts of the recast navmesh are only partially reconstructed depending on which properties you change. This would make sense since it would save a lot of time depending on context. But it really messes usability since the user has no way of knowing beforehand which of his chosen changed values are even taking effect or not.

The really specific ranges of 30 < agent radius < 40 and 139 < agent height < 149 suggest many of these range values are hardcoded somewhere. Again, this messes usability since the user would have no way to find out these problematic values without doing lots of unnecessary bisections.

Mieszko already acknowledged that the world outliner recast navmesh properties are broken and should not be edited (at least in regards to agent radius) in a post in one of these related questions. But the usability problems could be easily solved by simply pointing the user to the project settings section via tooltips or warnings... or even greying out the world outliner properties and not allowing them to be editted. Would save lots of user time while a fix doesn't happen.

(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