# Projectile not going straight

**URL:** <https://forums.unrealengine.com/t/projectile-not-going-straight/440545>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question\
**Created:** [January 3, 2019, 6:16pm UTC](https://forums.unrealengine.com/t/projectile-not-going-straight/440545 "2019-01-03T18:16:09Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![mahri726](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahri726](https://forums.unrealengine.com/u/mahri726)\
**Post date:** [August 4, 2022, 3:58pm UTC](https://forums.unrealengine.com/t/projectile-not-going-straight/440545/16 "2022-08-04T15:58:05Z")

</div>

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.

> [@How do I account for player motion when firing a projectile?](https://forums.unrealengine.com/t/how-do-i-account-for-player-motion-when-firing-a-projectile/416067/2):
>
> The problem is one of timing. To solve this, create a vector variable in the projectile called “InheritedVelocity”. In the details panel, set it to “Public” and “Expose on spawn”. Now go to where you spawn the projectiles and you will see the inherited velocity pin. Plug the pawn velocity in there. Then in your projectile, when you set the initial velocity, add in the inherited velocity. It should work fine (I’ve done it before).

---

_[View the full topic](https://forums.unrealengine.com/t/projectile-not-going-straight/440545)._
