Random

Hi,

I’m not sure if i’m using correctly the random function, because, well, the “random” is not that random at all, its actually predictable.

I’m initializing the random, with:

Random.seed = Time.deltaTime;

And then i try to get a number with:

number = Random.range(0,100);

But the results are not very random.
Am i doing something wrong ?

thanks,
Bruno

Uhh… I’m not completely sure you should be setting the seed. It should be plenty random enough if you don’t modify the seed.

Don’t initialize Random.seed unless you actually need repeatable random numbers.

–Eric