How do I control the random seed that the Navigation System uses?

If possible basically when you request a random point in radius from the Navigation System, I would like to control that seed to get the same result everytime I play.

The PRNG used to choose a point is FMath::FRand, which is just a wrapper around the standard rand() function. If you call FMath::RandInit() with a pre-selected value right before requesting a random point, you should get the same result given the same navigation data. (So that the same-ness doesn’t stick around afterwards, you should call FMath::Rand() before the query, save the result, and then call FMath::RandInit() with that result after the query is complete.)

However, the ordering of the navigation data is dependent on loading order, so you won’t get deterministic results if you do things like runtime generation, level streaming, etc.

An alternative would be to generate a bunch of random points at content build time and store them in an array.

Thank you for your help. I decided to sample a random point using a controlled random stream instead, with a check in navigation system to see if point is valid.
Worked like a charm with random seed control.
:slight_smile: