What does the "optimize" parameter of Navigation2D.get_simple_path() do?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By denisw

I saw that Navigation2D.get_simple_path() has an optimize function, but as that class doesn’t have any docs currently, I can’t find out what it does. I looked up the same function in the 3D Navigation, which mentions that it has something to do with taking actor radius, rotation, etc. into account - however, specifying an actor doesn’t seem to be possible with Navigation2D, no?

:bust_in_silhouette: Reply From: DodoIta

Essentially, it does what it says: it optimizes the path trying to cover the shortest possible one. That means, for example, that if the path goes right and then down, the Navigation2D will make the “traveller” move diagonally instead of right and then down, because it’s shorter. It’s kinda hard to explain it without showing it, so I suggest you try and set it to false and see what happens.