No Matter how i rotate/move the destination or where i place the agents, all agents always head to the same side of the target. Anyone got an idea, what the reason could be? Have a look at the picture i attached.
Thanks in advance! ![]()
No Matter how i rotate/move the destination or where i place the agents, all agents always head to the same side of the target. Anyone got an idea, what the reason could be? Have a look at the picture i attached.
Thanks in advance! ![]()
Well, the NavMeshAgent tries to reach the target destination with the highest precision possible, if you want that the position is randomized a bit try this:
navMeshAgent.SetDestination(target.position + new Vector3(Random.Range(.5f, 1.5f), 0, Random.Range(.5f, 1.5f));
This randomization will make the AI look more natural instead of robots.
Thanks for your comment! Thing is: This randomness will spread around my targetpoint which somehow is excactly that side of the building. So that my agents sometimes will go towards the other side of the building (which is what i want when thats the side thats closer to my agent.) i have to increase the random value range way to high.
โ NickNameRandomNumberI didn't completely understand what you are saying, I remember when I used to use NavMesh a lot that there is a toggle for enabling runtime navigation, which also avoids other navmesh agents, you can try to tick that and see if it works as you want.
โ Patrickmol