Closed mikeparker closed 3 years ago
Looks like Profile
class has the same problem. I'm getting identical patterns from profiles.
Looks like Profile class has the same problem. I'm getting identical patterns from profiles.
If you figure it out I be open for a PR :)
Problem
Right now, every
ParticleEmitter
generates the same random spread of particles. This isn't so noticeable with lots of particles but with a low number (e.g. 5 particles in a spurt) it's very noticeable.This is because the default
FastRandom
constructor initialises with a seed of1
.Fix
This simply initialises the
FastRandom
with a random seed used by generating a new guid. We must useMath.Abs
because FastRandom only accepts positive integers for the seed.