I have a shotgun I'm adding to my game and want to add particle trails on fired bullets to give it that extra oomph, only problem is I need the bullets to trail behind them regardless of direction, so that it doesn't do something weird like go up when the bullet is going left (it's a top down shooter).
all I can find online about this problem is an addon from 5 years ago and I feel like the particle system godot has now can handle that without it, I just don't know how.
how do I give a bullet a particle trail in 2D?
- Edited
Have you consider a secondary animated sprite for the "trail" effect versus particles? You can have it match the direction and trajectory of the bullet too with less work.
I would add a GPUParticles2D node as a child of your bullet scene. In your bullet's _ready() method, or every frame if your bullet changes direction after it's spawned, you could use $GPUParticles2D.process_material.set_shader_parameter("property_string", value) to change properties like the angle min/max of the particles. That way, whichever way your bullet spawns, it can manage its own trail. I hope that helps!
SnapCracklins this idea intrigues me, can you elaborate? I'm not too familiar with AnimatedSprite since I usually animate using normal Sprite and the animator node.
- Edited
okay... update. I figured it out. it actually already does what I want, I just had to turn all the gravity off.
for anyone in the potential future reading this, that's under (in 4.x at least) process_material > particleprocessmaterial > accelerations > gravity > gravity (set to 0,0,0)