If I set a default nav agent. And nav system picks this agent for vehicle.
And i also doesn’t understand about nav agent step hight and serach hight scale clearly.
Okay this is something I’ve personally experienced but not entirely an expert because I don’t know the exact portion of the code that deals with this. Our game uses character and vehicle AI as well and I did face this before.
However here’s what I experienced :
I was told somewhere that navAgent are automatically selected based on the bounds of your root component.Can’t verify this. But I didn’t get it to work reliably ( perhaps in some case Actor bounds is used instead maybe? )
SOLUTION : In my experience I had issue with vehicle selecting the wrong agent as well as character did. My solution is to custom feed the navigation data. In my case what I did was during init , I get all the reCast actor with specific string name in it (“vehicle”) or something. After getting the reCast. I feed it to the NavData when I do any Navigation System operation. It seems to work perfectly. I am able to manually choose the agent myself. This seems to work better for me.
Thanks for you help.
I have sloved my problem. I think nav system can’t update nav agent data in real time.
Each time I add a new navAgent, I need remove old NavMeshBoundsVolume and add a new one.
After this, nav system can select right nav agent data.
Thank your help again.