rParticle: The light weight, open source, GUI particle system

Anybody know how to change the lifetime of the particles?

1 Like

Please read the thread before asking questions.

(You can use particle.maxAge = int in your emitter.onSpawn function)

2 Likes

Just started using this and have it up and running. I’m wondering how I could set the particles to be world space instead of local to the object the particles are on.

For example, I have a 2d card moving across the player’s screen with this particle emitter but the particles move with the card, instead of leaving a trail as the card moves.

I’m guessing I could code this on my end, I figure its simply what the parent of the particle is, like if the parent is the card, it moves locally with the card, but if I could give the particle screen sized frame as the parent, it would populate where the card is, then stay where it is in the screen sized frame.

I haven’t looked at the project code for a while but I don’t think there is a specific option for world space coordinates. What I would recommend, is that you make the emitter the size of the whole screen

[(1, 0) (1, 0)]

Then the local coordinates should be aligned with the screen space global coordinates.

In the OnSpawn function you can then set the location where the particle emits from.