Unity particle works after a key is released
Blockquote
Hello guys, I've been trying to do have a nice particle effect that only plays while I am holding a key. It works with one premade particle made by unity, but I wanted to make my own and It doesn't work. Like I said it only works when I release my key
Here is the code i use to activate it.
if (Input.GetKey(KeyCode.Space))
{
rb.AddForce(Vector2.up * kraft);
eld.Play();
}
Here are some of the settings I have for my particle system:
This is a video I've made of this: https://www.youtube.com/watch?v=uS_I-2GXpp0&feature=youtu.be&ab_channel=klertamarta
Not entirely sure what your effect looks like, but your effect isn’t looped, hence it would only emit few particles for 1 second and end. You may enable “Looping” of your fx.
I've already tried that, but thank you for the reply
Your answer
![](https://koobas.hobune.stream/wayback/20220612181517im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to make a particle system evenly lit? 1 Answer
Little dust particles after player jump hitting ground 2 Answers
Particle System only playing on start and end of GetButton() 0 Answers
I have a particle system that is playing at the wrong time... 1 Answer
ParticleSystem.Bake() not working with specific particle 0 Answers