I'm having trouble figuring out how to make a particle emit a different texture without affecting already created particles. Is this possible to do with just one ParticleSystem? For example, I have a ParticleSystem that has emitted 3 copies of ball.png. If I change the texture to box.png, I don't want it to change previously made ball.png particles, but any new particles use box.png.
Also, is it possible to do the same with Quads. Can I make a particle use a certain quad from a list and not change during its lifetime?
Thanks in advance!
Pausing animation in ParticleSystem
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Pausing animation in ParticleSystem
Last edited by XHH on Fri Aug 24, 2018 7:48 pm, edited 1 time in total.
I like to draw and program
Re: Changing texture and quad in ParticleSystem
BUMP: Anyone know if it's possible to pause the animation in a ParticleSystem that uses quads? I just want to draw each particle to be a different frame of a spritesheet and not change to any other part of the animation.
I like to draw and program
Re: Pausing animation in ParticleSystem
Take a look at ParticleSystem::update (1); it seams that quadIndex is a function of t (normalized "age" of a particle) so no way to achieve what you want using vanilla LÖVE. As of using different textures: there is also impossible because texture is a field of the ParticleSystem and Particles know nothing about it.
If you're willing to build your own love version than removing this (2) part and updating (3) to pick a random value from 0 to quads' length - 1 should do the trick. Some more work is needed if you want this behaviour to be optional.
(1) https://bitbucket.org/rude/love/src/ccc ... em.cpp-997
(2) https://bitbucket.org/rude/love/src/ccc ... pp-992:998
(3) https://bitbucket.org/rude/love/src/ccc ... em.cpp-389
If you're willing to build your own love version than removing this (2) part and updating (3) to pick a random value from 0 to quads' length - 1 should do the trick. Some more work is needed if you want this behaviour to be optional.
(1) https://bitbucket.org/rude/love/src/ccc ... em.cpp-997
(2) https://bitbucket.org/rude/love/src/ccc ... pp-992:998
(3) https://bitbucket.org/rude/love/src/ccc ... em.cpp-389
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 7 guests