Generates a random position on the surface of a given spawn location, while ensuring that the generated position is at least MinDistanceToEdge away from any edges. The LabelFilter parameter allows you to specify which types of surfaces should be considered for generating the random position.
ParametersSpawnLocationThe location where the random position should be generated.
MinDistanceToEdgeThe minimum distance from the edge that the generated position must have.
LabelFilterA filter that specifies which types of surfaces should be considered for generating the random position.
OutPositionThe generated position.
OutNormalThe normal vector of the generated position.
ReturnsA boolean value indicating whether a valid position was found. If no valid position could be found, both OutPosition and OutNormal will be set to zero vectors.