I have used a script and some tutorials on creating random particle system Starfields. It sets the particles nicely randomly in a circle. But is there a way to move the entire set of particles in the circle around without moving their x and y coordinates? Wanna simulate scrolling backgrounds. This is the code I have so far.
private void Create()
{
float x = Random.Range(0.0f, 50.0f);
float y = Random.Range(0.0f, 50.0f);
float z = Random.Range(0.0f, 50.0f);
points = new ParticleSystem.Particle[maxStars];
for (int i = 0; i < maxStars; i++)
{
float r = Random.Range(0.5f, 1f);
float g = Random.Range(0.5f, 1f);
float b = Random.Range(0.5f, 1f);
var circle = Random.insideUnitCircle * 90;
var newpos = new Vector3(circle.x, -5, circle.y);
points*.position = newpos;*
points*.startSize = Random.Range(0.05f, 1f);*
points*.startColor = new Color(r, g, b, 1);*
}
Stars = gameObject.GetComponent();
Stars.SetParticles(points, points.Length);
}