By pressing a button, my character spawns a simple projectile (a different blueprint with attached a ProjectileMovement component). I haven’t modified anything in the projectile component aside from the Initial Speed and set to 0 the Projectile Gravity Scale.
In the character blueprint I simply spawn the projectile whenever I press the input button. The projectile spawns correctly but the problem can be noticed when, after shooting the projectile, I move my character. The projectile can be seen slightly changing its direction as if dependant on my character. It can be seen more evidently when the character dashes to the left or right, because the projectile moves faster accordingly to my character.
To be clear, it moves unexpectedly well after I move the character that spawns it, not if I move the character in the exact moment that I spawn the projectile.
Is this a normal behavior of a projectile in UE? What can I do to avoid it?
I hope my problem is clear, thank you.
There is a checkbox in projectilemovement conponent which tells it whether to add the spawner’s speed to the projectile’s speed, If I remember correctly.
Also I think your projectile is colliding with and getting pushed by your character. Make sure its collision type and channels are nt going to result in Blocking on both the projectile and the character pawn. If only one is blocking when they meet then it will resolve to Overlap and not push the projectile.
Yes, there was a checkbox in the movement component of the projectile that I thought I tried to uncheck but apparently I forgot to actually try. It solved the problem. Thank you for your answer.