- A* version: 5.2.5
- Unity version: 2022.3.33f1
Hi, I am just wondering if there is any optimization to get the nearest path?
as shown in the image, it goes towards the red path, although the green path is shorter.
My A* settings are as below:
For movement script, I am just using
private IAstarAI ai;
private void Awake()
{
ai = GetComponent<IAstarAI>();
}
// click to move
public void MoveTo(Vector3 destination)
{
ai.destination = destination;
ai.SearchPath();
}
Where’s the destination, just directly in front of the units? And if that’s where the destination is, would you want them to “punch through” the units in front, or am I misunderstanding the desire for the pathing…
Ah, I forgot to set the destination. My apologies.
As shown in the picture, the yellow circle is the destination. It’s correct that the unit should avoid collisions with other units using RVO, but currently, it’s taking the red path instead of the green path…
Hi
Local avoidance (or RVO) is, as the name implies, local. This means that the agent only considers its immediate surroundings. It doesn’t plan a path, and it is not at all unlikely that it takes a decision that looks good momentarily, but is not the globally shortest path.
The local avoidance is slightly biased towards passing other agents on the right side (as configured by the RVO Simulator → Symmetry Breaking Bias setting).
In that case, is there an optimized way to ensure the unit takes the shortest path while using RVO? Would adjusting the settings of the RVO Simulator help achieve this?
I’m curious what your settings are for your units because I can’t get my unit to behave this way with a similar set up. Can you post your agent settings?