mob-sakai/ParticleEffectForUGUI

Particles not going to Attractor center

SporeProductions opened this issue · 2 comments

The particles seem to go to an offset from the Attractor's center. If The particle system is at 0,0 and the Attractor is at 0,0 then the particles will move to 0,0 but if the particle system is started at other coordinates, then the particles go to an offset from the attractor's center.

Example coordinates:
Particle System at 0,0 Attractor at 0,0: Particles go to 0,0

Particle System at -800,400 Attractor at 0,0: Particles go to about -100, 40

Particle System at 800,400 Attractor at 0,0: Particles go to about 100, 40

Particle System at 800, -400 Attractor at 0,0: Particles go to about 100, -40

And the distance of offset gets worse if the Attractor is positioned elsewhere.
Why is this?

I figured out part of the issue and a solution:

My Particle System was set to Local Simulation Space. I changed it to World and now the destination position of attracted particles is correctly the center of the Attractor.

I also had to set the UI Particle to Absolute positioning, otherwise it would move to the wrong coordinates.