Projectile spawning animation weird

Hello, people!

I Have problem with animation or spawning or hitting related to my tank as a target(turret is firing at me).

On a screens 1 and 2 you se projectiles spawning in pairs and caught in a flight, but according to the “World outliner” window they are spawning more often like a laser, but on a very small radious, they a spawning at exact same position in the pair way. But they dont hit a tank haha. I tried to change fire rate but animation didint change. I increased fire range and... The animation is the same, but now it fires single shot on a distance, in a momemnt another single, than two in a row!, than three, than two , than 1 and 1 and again. A bonus question: the first shot doesnt do any damage)
Thanks for you attention.


This is my code




The fire is going to trigger every tick. If you want to limit to a specific interval, you need to track the last time it fired and if the difference between then and now > time between shots, fire again.

Thanks for your reply. My problem is much bigger, Ive changed my code, and now have other bugs) so Ill close the topic.

1 Like