Lasers Not Firing Now

When I tried to use code (using the old input system) to enable/disable emission, the lasers would only fire for the first second or two of play and then stopped. The emission box would still flick on and off and the console still showed “shooting/not shooting”, but no lasers appeared.

I couldn’t figure out the problem, so I just reverted to when the laser trails disappear when the player stops pressing the button. Someone else seemed to have this problem so I’m just posting in case it keeps happening to people.

Hi Alexander,

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? And have you already tried to add Debug.Logs to your code to see what is going on during runtime?

If you cannot find the issue, try to comment out the code where the particle system gets disabled. Also increase the lifetime of the particles. Use a high value, so you’ll definitely be able to see something.

Hi Nina,

Thanks. I did check my code and used Debug.Log to ensure that the code was being run. I’ll try increasing the lifetime of particles and continue to troubleshoot.

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

Privacy & Terms