How to switch Path Postprocessing in code

Godot Version

4.3

Question

Hi! I need help with pathfinding. I need to switch from Edgecentered to Corridorfunnel in code, but I dont know how to do that.
Screenshot_2024_08_21-1
Screenshot_2024_08_21-2

Help will be apperciated!

NavigationAgent2D.path_postprocessing property expects a value from NavigationPathQueryParameters2D.PathPostProcessing enum so it should be like:

$NavigationAgent2D.path_postprocessing = NavigationPathQueryParameters2D.PATH_POSTPROCESSING_CORRIDORFUNNEL

thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.