Zenden1
December 23, 2018, 4:35pm
1
Hello, i wan’t set my particle position, i can only do that i start but it doesn’t work. Why ?
void FillParticlesArray(Vector3 position)
{
particles = new ParticleSystem.Particle[particlesSys.main.maxParticles];
int nbParticles = particlesSys.GetParticles(particles);
for (int i = 0; i < nbParticles; i++)
{
particles[i].position = position;
}
particlesSys.SetParticles(particles, nbParticles);
}
EDIT :
Hi, after some tests i have found how the bug work.
When i activate play mode, the particules are in good position during 2 seconds and after it going to random position.
How can i disable it ?
Used Debug.Log and breakpoints to find issues.
Zenden1
December 23, 2018, 7:30pm
3
Hi, after some tests i have found how the bug work.
When i activate play mode, the particules are in good position during 2 seconds and after it going to random position.
How can i disable it ?
Are you sure, you not looking at emitted particles, rather than source?
Btw, is not bug, but debug
mgear
December 23, 2018, 8:42pm
5
probably the particles die (due to Start Lifetime value) and then respawn elsewhere.
so try lifetime as some maximum value, and disable emission too.
2 Likes
Zenden1
December 23, 2018, 8:56pm
6
Thank you !!! Now it during more time but i’m going to set more time with script. It isn’t possible to set the value “infinity” or something like that?
qkson
December 23, 2018, 10:36pm
7
Well, actually You could type “infinity” in the lifetime field and it will work (it worked once), so try doing that.
Zenden1
December 24, 2018, 9:29am
8
No it doesn’t work for me.