+1 vote

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?

in Engine by (13 points)

1 Answer

+1 vote

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.

by (570 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.