Best way to avoid objects?

4.3

Hello! What would be the best way for a navigationagent2d to avoid a staticbody? I have tried with NavigationObstacles but nothing really seems to work that good for my game. Thanks in advance!

Changing the navigation mesh.

1 Like

How would i do that?

What specifically do you mean when you say that navigation obstacles don’t seem to work that well for your game? Have you remembered to re-bake the navigation mesh after adding the obstacles? You can also play around with the agent/mesh radius

If you want a complicated but fun solution you can look into something called context-based steering, which is when you give your agents raycasts in different directions and then update their movement based on how the rays collide with obstacles