Godot Version
4.4
Question
How to get a random point from NavigationServer3d with respect to NavigationLayers
Hello i am using C# an Godot 4.4.
In my scene i have
→ Main
→→World
→→NavigationRegion3D
→→→GridMap
My GridMap use a MeshLib with multiple tiles. There are 2 tiles called floor_a and floor_b. In the GridMap i have set the NavigationLayers for floor_a and floor_b to be 2 and removed them from 1.
I tried:
var mapRid = GetWorld3D().NavigationMap;
spawnPosNav = NavigationServer3D.MapGetRandomPoint(mapRid, 2, false);
This just gives (0, 0, 0)
GetWorld3D().NavigationMapDoes this get NavMesh that is in the GridMap?- How can i use NavigationServer3D.map_get_random_point to get a point that is on guaranteed to be in layer 2?