Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.29 KB

navigation_obstacles.md

File metadata and controls

21 lines (11 loc) · 1.29 KB

General Info

Navigation API has been reworked for Godot 4.1, but the docs aren't synced yet.

PRs

Gotchas

The docs make it seem like NavigationAgent3D.velocity_computed signal is emitted only after NavigationAgent3D.velocity is set to a new value, but this is incorrect see doc ref..

velocity_computed signal is emitted every frame because the navigation agent has no concept of "standing still" as explained in this issue comment.

Furthermore, the callback registered with velocity_computed will be called with the last computed safe_velocity. In practice this means that it isn't enough to set_physics_process(false).

One workaround is to connect the velocity_computed signal when we set a new target and disconnect it when the target is reached. I don't know if there are any corner cases here.


Checking the docs from latest, they differ from stable regarding navigation obstacles.