UPDATE
So I wondered whether this might have been related to that last code change, and in fact it was. So what was actually happening was that the projectile was being instantly destroyed, but, with the key presses it made it look like there was an issue with input. It was just that when the tank was turning it was more likely to make contact with the projectile spawned in front of the barrel, and thus called the “Destroy()” code instantly.
Sharing in case this helps anyone else.
I know I can move the spawn point further forward, although aesthetically that won’t look quite as nice. Equally I could increase the projectile velocity, but again I’d rather not. So, to resolve, I would probably have the tank ignore collisions with its own projectiles.
Whilst running through this lecture I play tested the game in anger to see if an issue I was having previously still occured (e.g. a projectile being spawned but the tank hitting it and then it not moving).
This issue appears to be resolved after the “Destroy()” code move - however, I then noticed something else…
I’ve I used the W key to move forward and spam the left mouse buttons, lots of projectiles, but as soon as I also press A or D to turn, the mouse input gets ignored. The same is true if I just hold down A or D to turn, spam the mouse button and then press W to move forward. It seems if there are two keys being pressed/held, the input from the mouse is getting ignored.
Wondered if there was any kind of setting for this?
I can pop a video together of the issue, but obviously it won’t show the buttons I’m pressing when the issue actually occurs.
Its not exactly a huge problem, but not something I’ve ever come across in other Unreal project so thought I’d ask