Angle showing weird behaviour in Phaser 3

I am trying to implement a shooting mechanism in my game, but the bullets keep shooting in random directions when I try to fire the bullets.

I am following this example :.
Example

One thing I noticed is that the first time I tap on the screen it perfectly fires in the required direction but the second time it fires in some random direction. If I repeatedly keep tapping in that direction it adjusts and fires in my direction.

Hey Steel,

Would you mind providing a link to some code so I can have a closer look? It sounds like one of those problems where you just need a fresh pair of eyes to check over everything and spot the logical error. : )

Cheers,
Tom

Man, thanks a lot for your time. I later rechecked the code and as you said it was a logical issue. The sprites were supposed to be destroyed.

No problem! Glad you found the issue.