Particle Effects Being Unpredictable - GoDot 4.2

Hello, as the title suggests I have ran into a strange issue I can’t seem to diagnose.
I have followed along with Kaans course in for GoDot 2D, specifically Alien Attack. Everything was smooth until the particle video which required a good bit of personal searching, and tinkering to identify some differences, and I’ve now made my player character have a nice flame effect behind them, so I thought why not give it a shot with the rocket?
I did just this and created a particle effect for the rocket that looks good. However, seemingly randomly the particle effect after shooting the rocket blasts forward in front of the rocket rather than trailing behind it as I intended. I must note that it does so randomly because I can sometimes fire several shots with nothing out of the ordinary or unexpected, and then on the tenth shot (or whenever) it is almost as if it switches origin points, and then goes the opposite of the direction it is set to.

I should note I had to do a few things differently with the particle system, but my player character doesn’t have this happening just the rocket.

The things I changed (due to the GoDot update)

  • I made gravity in the -x direction to get the particle to flow behind.
  • I added speed, and shortened and did explosiveness as well as the lifetime in the Time setting
  • I upped the FPS to make it look smoother.
  • Other than that I just used material in canvas item and texture to change the appearance of the particle to look more like a flame/smoke. I was hoping someone could point out what the issue might be. I was wondering if it has something to do with the way its attached to the rocket?
    As with the player character it is simply a GPUParticle2D attached as a child node of the rocket (which is an area2D).

Otherwise my Alien Attack game turned out great. I got to add/change a few things to know I’ve been building on my game development skills has been incredible. Thanks to everyone here for being so supportive and answering questions.

That’s a good extension! And especially because you’ve limited the firerate in your game, you shouldn’t run into performance problems by having 200 particle effects onscreen XD

Just to confirm, you have a different particle system for the player and the rocket, right? This would certainly be preferable.

I did encounter this issue once before, but I don’t remember exactly what solved it because I had been playing around with the settings for a couple hours, experimenting with different effects. I do strongly suspect particle gravity plays a role though, if not being the outright cause.

Because the rocket is moving anyway, the first thing I would try is setting the particle gravity to 0; my player thruster is set up that way too. If particles have a reasonable initial velocity and a random direction, then the X-translation provided by a fired rocket’s own movement should be enough to give you the effect you’re after.

You can use Spawn–>Velocity–>Spread to change the range of the randomized direction; a narrow spread if you want something more focused like a rocket flame, or a 180 spread for totally random directions, which would be good for a trail of smoke puffs. It sounds like you’re trying to do both, which is fine, and in that case you might actually want to use two separate particle systems for the rocket (but focus on getting the first one working before doing that. Then it’ll be much easier).

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms