Radius on agents

I have a problem understandig the radius paramter in IAgentParameters, and maxAgentRadius in the createCrowd function.

My problem is that the agent is clipping into the obstacles that it passes through, and for some reason, no matter what I try setting these two radii values to, nothing changes. Am I missing something, or am I looking in the totally wrong place?

I have made a playground here that illustrates the problem. The navigation doesn’t seem to work like it does on my local env, but the main thing is that I am importing the two same meshes that I am locally, and I see the same issue, with the agent mesh, clipping inside the “obstacles”.

Screenshot 2024-02-28 at 14.15.22

Link to playground

Thank you in advance!

Hi @Rasmus_Dev welcome to the forum!

There is a chain of width/radius to take into account
Basically, agent radius is only taken into account when separating agents, not to tell where they can go.
Agents position (its center) can be placed anywhere on the navmesh.
Recast works by restricting the navmesh instead.
So, instead of increasing agent radius, navmesh is eroded. Change walkableRadiusto see its influence on the navmesh.

1 Like

Ah, I see, thank you for the fast response.

1 Like