0 votes

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?

Godot version 3.2.3
in Engine by (16 points)

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?

1 Answer

0 votes

Try this in the inspector:

Your_Particlenode -> Drawing -> Local Coords = unchecked

by (1,448 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.