Projectile not going straight

I had the same problem. While moving the character, the projectiles were not going straight when shooting up. Fortunately, I found a solution that worked for me.