Important: If we work with NavigationMaps it is important to let the navigation server load the maps by skipping a frame:
public override void _Ready()
{
// ...
// Make sure to not await during _Ready.
// see more: https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_introduction_2d.html#setup-for-2d-scene
Callable.From(ActorSetup).CallDeferred();
}
private async void ActorSetup()
{
// Wait for the first physics frame so the NavigationServer can sync and create navigation map
await ToSignal(GetTree(), SceneTree.SignalName.PhysicsFrame);
navigationReady = true;
}
Followup to https://github.com/Abb4/earie-treasures/pull/30, specifically https://github.com/Abb4/earie-treasures/pull/30#issuecomment-1676478024
Broader Discussion and problem statement: https://github.com/Abb4/earie-treasures/discussions/71
Important: If we work with NavigationMaps it is important to let the navigation server load the maps by skipping a frame:
Here is what I could find:
but gave up:https://github.com/godotengine/godot/pull/70724#issuecomment-1572468095https://github.com/godotengine/godot/pull/80796NavigationObstacles
: https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationobstacles.html#doc-navigation-using-navigationobstaclesNavigationAgents
: https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationagents.html#navigationagent-script-templatesNavigationMeshes
: https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationmeshes.htmlTileMaps
: https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.htmlNavigationServer
: https://docs.godotengine.org/en/latest/tutorials/navigation/navigation_using_navigationservers.html