Projectile spawned changes direction based on the Third Person Character Controller movement
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.
asked Jul 13 '18 at 04:51 PM in Blueprint Scripting
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.
answered Jul 13 '18 at 08:13 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here