How do I emit a ship's engine exhaust correctly?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By furrykef

I’ve got a ship that emits a trail of particles of exhaust as it flies, but I can’t get it working quite right.

The most obvious thing is to just add a CPUParticles as a child of the ship. This looks good when the ship is moving in a straight line. But when the ship rotates, the particles that have already been emitted follow the rotation, and this looks very wrong.

So I unchecked “local coords” so the particles would appear to be decoupled from the ship. And indeed they are… but now the particles don’t have any of the ship’s momentum when they spawn; that is, there’s no relationship between the velocity of the particles and the velocity of the ship. Thus, the particles appear to be flying out of the engine much faster than they should be.

So I tried adding the velocity of the ship to the initial velocity of the particles, and it’s still not behaving the way I expect. I get things like the particles flying right when the ship turns right, instead of flying left as expected. I’ve experimented with things like changing the emitter’s direction attribute, or rotating it 180 degrees… nothing seems to help. What am I doing wrong?

i think you have done everything correctly up to adding the ship velocity.
maybe you are simply confusing global velocity and local velocity, adding the wrong one to the particle speed.
What code did you write to modulate the particle velocity?

I get things like the particles flying right when the ship turns right, instead of flying left as expected

just to clarify, are you watching the scene from a stationary camera or from a camera that follow the ship?

Andrea | 2021-01-17 10:40

:bust_in_silhouette: Reply From: whiteshampoo

Try this in the inspector:

Your_Particlenode → Drawing → Local Coords = unchecked