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 .
I tried modifying all sorts of checkbox and sliders in the capsulecomponent , movementcomponent and even in the project settings creating supported agents .
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 .
asked May 09 '16 at 06:01 AM in Using UE4
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.
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)
Then i used it with the pathfinding.
In Project Settings->NavigationSystem i created Agents for my different Characters with the Height and Radius i wanted.
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)
answered Feb 21 '18 at 12:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here