114 Auto Avoid Each Other (Go to Video Tutorials)


Introduction

As we mentioned before, if we want our agents to avoid each other, we usually need the "sphere" logic to achieve that (Detection Range Sphere)

But in some case we want to simplify this process, in below cases, we can ignore the slipping on the feet (or no feet):

After version 2.5, we provided the Auto Collision Avoid tool which can make our agents avoid each other automatically without any setup.
The smallest radius
Before talking about the auto avoid, there is a very important concept need firstly clarify. It is the smallest radius.
Each agent has a radius range, if other agents in this range, the agent will push out other agents a little bit, and this range called "smallest radius". That's the closest distance the agent can bear other agents.
The smallest radius can be calculated by:



Agent Smallest Radius = Agent Sphere Radius * Smallest Radius Ratio

So by default the smallest radius of agent is the HALF of the sphere radius. The reason we setup the HALF of the sphere range as the default, because:


Instructions

The only things we need to do are:


Select and see the sphere range




Open auto avoid and adjust the push speed


The Push Speed
The push speed means the percentage the current agent push other agents outside the smallest radius. Like the following 2 pictures shown, the first case is 1 (100% per frame), that is means push the other agent out directly from the smallest radius in a single frame.



Push speed is 1 (100% per frame)


The second case is 0.5 (50% per frame), that is means push the other agent out from the smallest radius 50% each frame and after 4~5 fames, the other agents will be pushed out, the whole process is smoothly.



Push speed is 0.5 (50% per frame)


Our default value is 0.3 (30%) and that is a smooth setup, if you want to use 1(100%) there might be some jitter in some cases.