Getting Random Location In a NavMesh


So for this week of development the big problem I ran into was the inability to use the GetRandmonLocationInNavigableRadius. For a long time I tried to use the method call but it would always return false on if it worked and I was confused on why since the nav mesh was loaded by the time I was able to check. I also could see that the nav mesh was getting grabbed and looked at, so I was left confused on why the location could not be grabbed. The eventual thought process led me to see if the nav just wasn't loading correctly when I was trying to use it. 

This eventually led me to the problem of it just not being fully loaded at the times I thought it was. So with a little research I was able to find that the navigation system itself had a bind call that would be of great use to me. This bind call would make sure to wait for the navigation bounds to be done making and then allow for any event I want to be called. I then made it to where the function to spawn in all the traps that were needed was called in this event. This fully allowed for correct spawning to occur and the room being created being fully implemented.



Leave a comment

Log in with itch.io to leave a comment.