Hi everyone, I am taking an UE 5 course and currently in Warehouse Wreckage section. Here is my current level blueprint:
I have completed firing mechanic, but noticed that sometimes fired projectiles behave strangely. I turned off physics on projectiles to verify and then it was clear that if I look in direction, that is different from the one where player pawn looks after its spawn, the projectiles start spinning after launch. Interestingly, if I shoot in direction, where player pawn looks at the start, projectiles fly without spinning. Also I have noticed that the more I move the camera from the starting diretcion, the more projectile spins. Another important thing to note is that it doesn’t affected by pawn’s position, only by direction of camera.
Sometimes this thing even messes with aim and makes projectiles fly in slightly different directions without input from the mouse.
Also I noticed that if I shoot while flying in any direction projectiles don’t spin, but my pawn abruptly appears a bit higher than it was before, as if projectile appears in player’s pawn and instantly pushes it upwards.
I tried to change projectile’s mass, dimensions and form and also the impulse it gets, but the problem was still there.
I am not sure if the problem is within my project or this is intended. I suspect that it’s the position of the spawned projectile that causes the issues. Maybe, as it spawns exactly in player’s pawn location, and since this pawn, as far as I understand, has collision (I can’t fly through objects while playing the game in editor) it may cause conflict, so UE just disengages these actors as fast as it can. Also the pawn’s rotation is not changing during gameplay, so it may explain why shooting in starting direction differs from shooting elsewhere. And shooting while flying makes Unreal do all the operations differently (I guess
), so in this case it affects pawn instead of the ball. But still I can’t explain why more rotation from starting direction means less accurate shots and more spinning.
So I would like to know if my guesswork about the problem was correct and hear real reasons if not. I am also curious why player’s pawn has different interactions with projectiles shot in front of it and to the side of it (different spinning, if any at all). And, of course, I would like to know what is the best way to fix it and make projectiles fly straight without spinning: maybe I need to do something with collisions or spawn location or with player’s pawn or place some nodes in blueprint?
Also maybe all of this is explained later in the course (I am seeing lectures about collision meshes and BSP), but I haven’t gotten there yet, so let me know if all the answers will be there.
Here is my project: https://drive.google.com/file/d/1iNvN9jYC2tlBOztMfQE8Oay8QhVds1d4/view?usp=sharing

