How to design a variable Particle System for projectiles

Hi

So my game starts taking shape and I wonder what is the best way to code my projectile spells…

I want to be able to attach a script to an empty GO that describes the position/rotation throughout a certain timeframe, e.g. 0/0/0 until second 0.75, then 5/0/0 until sec 1, then 10/0/0 until sec 2, then die.
Below this empty GO I want my particle effects. Just take a fireball as an example that also has a trail following it.

Instead of fiddling with the particle system properties, I see the option of making it fly on the spot so that I can freely move it with my position script. I need this because I act on a kind of chess board and I can hurl my fireball from any place to any other place.

So is it the right approach to design my particle effects so that they fly on the spot (and have their trails with negative force)? The other option I see is to make it move exactly 1 unit and then increasing the speed of all particle system components. But I want to avoid too much fiddling with the particle system properties via script. Is it the best approach to not touch the properties, let it fly on the spot (trails with negative speed), and attach the positioning script?

A disadvantage of that would be that if you look at the trail, floating from 0/0 to -2/0 while on the spot, it will be on 8/0 if I move the whole GO 10 units to the right. But I want the already created particles to stay on -2/0 and only the newly created ones to be created at 2/0, 4/0 etc. How to achieve this intuitive movement of a fireball in the best way?

You could use an Empty GameObject as root, then two children. One with the “fixed location” effect, and the other that moves.
No need to limit yourself to a single GameObject with everything.

Root
|
±> Movable Effect
±> Fixed Effect

Also, you could use the native Shuriken with Simulation Space set to World, so even if you move the game object (EDIT: with the emitter) the particles aren’t affected.

1 Like

But it is only 1 object, a fireball which is being hurled. And the trail follows the fireball. I dont have any fixed effects. I just wanted to say that I want a fading trail which -once created- will not follow the flying fireball anymore. I needed a lot of those “fixed” effects if I understand your first approach correctly.

But the second part sounds promising. I will dig into that and see if I have any more questions :slight_smile: thanks a lot

AWESOME! Exactly what I was looking for :-*

Ah, then I misunderstood you original question. Glad that the Shuriken setting worked :slight_smile: