How to use NavigationObstacle2D

So the NavigationAgent.Velocity should have been set using a Timer instead of the _Process function? Give me a few minute, I need to try it.

Sorry my last message was wrong i think. is it normal that Velocity is written with a capital V in C#?

Yes, most variable in C# is written in PascalCase. Also, the issue is fix (albeit in a sketchy fashion). The agent would go off boundary and manage to avoid the obstacle thanks to it less frequent update; rather than the algorithm tell the agent to go around the obstacle. This shouldn’t be considered as a solution to the problem I’m fixing.

1 Like

Oh, I should note, this fix only work for obstacle with convex shape (in an unreliable fashion) and fail to work on non-convex shape depend on the angle the agent approach from.

To all the people who may come to this post in the future, no solution for my specific case is found. However, here are some solution that has been suggested that may work for you:

1 Like