# How do I account for player motion when firing a projectile?

**URL:** <https://forums.unrealengine.com/t/how-do-i-account-for-player-motion-when-firing-a-projectile/416067>\
**Category:** World Creation\
**Tags:** projectile-movement, unreal-engine, velocity, Blueprint, question\
**Created:** [January 31, 2018, 8:28pm UTC](https://forums.unrealengine.com/t/how-do-i-account-for-player-motion-when-firing-a-projectile/416067 "2018-01-31T20:28:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [January 31, 2018, 8:39pm UTC](https://forums.unrealengine.com/t/how-do-i-account-for-player-motion-when-firing-a-projectile/416067/2 "2018-01-31T20:39:14Z")

</div>

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/how-do-i-account-for-player-motion-when-firing-a-projectile/416067)._
