Open SwagAccount opened 1 month ago
Copied the function to my code and this just doesn't log at all
Logging the position 2 shows that the points being checked are perfectly within range of getclosestpoint, meaning that is probably what is wrong here.
Okay so figured it out, still stupid, but I figured it out.
Even though, as of now, I'm awaiting the generation on start the nav mesh hasn't generated/loaded yet after the await (fix works even without awaiting this).
All I needed to do to fix it was to add a Task.Frame() after the generation.
Feels silly.
P.S. This is just a work around for not being able to access the actual mesh data which doesn't allow me to grab all edges, instead I have to literally throw shit at a wall to find as many edges as possible.
Describe the bug
I am trying to use GetRandomPoint and GetClosestEdge, but it just isn't working with any map.
The navmesh is generated and looks correct.
To Reproduce
Expected behavior
Returning random points on navmesh and find closest edge
Media/Files
https://github.com/Softsplit/sandbox-classic/blob/Testing/Code/AI/CoverFinder.cs
Additional context
No response