Trail + ParticleManager

Hi all,

I am having slight troubles calculating the emission direction of the particles. I would like the direction of the emission to be in the opposite direction as the ship.



Any ideas? thx

Couldn’t the emission vector simply be the opposite (or negative) of your ship’s velocity vector?



edit: Hmm. Perhaps that’s a rather superficial analysis. I suppose you could also factor in the ship’s acceleration too?

I have reading the cood from the partial system and from what I understand of the cowd I think there would be a problem if a moving object emits particles. For example if there would be a problem if a moving car on fire would emit smoke. The situation would call for partials that move directly up but the source is moving. If you attach the particles to the car they would move the partials with the car. If it was attached to the world then I would have to update the embers poison each step. The problem gets worst when rotation is involved.



I would recommend making the ParticleManager a noad that says where the partials were emitted. For EricTheRed’s example he would just need to set the emission to -1,0,0 or whatever is backwards on his game.



(I apologies for the bad spelling)

://

Actually, the particles in your car example are only emitted relative to the car, but subsequent updates of position would be based on current position of the particle, not the new position of the car. Thus a moving car would leave a trail of smoke based on the path of the car.



I understand what you are saying about attaching to the world versus attaching to the car, but if you attach to the car, the smoke would get pulled along with the car, and would change velocity with the car, which would not make sense.



That said, particles are not really attached to the world… they are attached to whatever node you attach them to. So if you attached them to the exhaust port of your ship and had them shoot out the back, then rotating your ship should rotate the particles.



At least, that’s how it should work. Now I’m curious about this and will put together a demo to verify :slight_smile:

"renanse" wrote:
That said, particles are not really attached to the world... they are attached to whatever node you attach them to. So if you attached them to the exhaust port of your ship and had them shoot out the back, then rotating your ship should rotate the particles.


But then the particles will folow the exhaust port wich should folow the ship.

Ok, I have added two new tests… TestRigidSmoker and TestDynamicSmoker. The first one has the particles directly attached to the model. If the model rotates, all the particles rotate with it as if they were attached by steel wires. The second one has the particles attached to the world, but emitted by a little disc inserted in the model. This emission direction and location changes but the particles move on their own after emission.



So, both methods are already supported. Each may have different strengths depending on your circumstances.

"Badmi" wrote:
But then the particles will folow the exhaust port wich should folow the ship.

If you want your smoke to look like it is nailed onto the car (thus smoke that has already blown out of the car would still turn with the car as if it were somehow magically attached...) you can use the way I outline in TestRigidSmoker... Personally I like the other way better, but more options are great. :)