# How do i add a force to my pawn, in the direction it is pointing?

**URL:** <https://forums.unrealengine.com/t/how-do-i-add-a-force-to-my-pawn-in-the-direction-it-is-pointing/486849>\
**Category:** World Creation\
**Tags:** space, unreal-engine, Physics, question\
**Created:** [July 30, 2021, 5:15pm UTC](https://forums.unrealengine.com/t/how-do-i-add-a-force-to-my-pawn-in-the-direction-it-is-pointing/486849 "2021-07-30T17:15:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vatexa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vatexa/32/88711_2.png) [@Vatexa](https://forums.unrealengine.com/u/Vatexa)\
**Post date:** [July 30, 2021, 5:15pm UTC](https://forums.unrealengine.com/t/how-do-i-add-a-force-to-my-pawn-in-the-direction-it-is-pointing/486849/1 "2021-07-30T17:15:53Z")

</div>

I’m currently building a spaceflight game and i wanted to have movement that preserves the momentum of the ship when no input is received. in a way that when you move the ship, it keeps moving until it is acted upon, due to the vacuum of space. So I’ve been trying to move my pawn with AddForce, but it only adds force relative to the world space, and not the pawn. how can I get the force to be added in the direction that I want the ship to move, relative to the ships orientation? I tried getting a direction vector by having a second static mesh in front of the ship, and using GetUnitDirection to use for my force vector, but that didn’t seem to work.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [July 30, 2021, 5:40pm UTC](https://forums.unrealengine.com/t/how-do-i-add-a-force-to-my-pawn-in-the-direction-it-is-pointing/486849/2 "2021-07-30T17:40:59Z")

</div>

Hello! You can use this **SomeSceneComponent-\>GetComponentTransform().GetUnitAxis(EAxis::X)** to get forward vector for some **USceneComponent** in World space. Just use it with primary mesh component.

---

<div class="post-metadata">

**Author:** ![Vatexa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vatexa/32/88711_2.png) [@Vatexa](https://forums.unrealengine.com/u/Vatexa)\
**Post date:** [July 30, 2021, 7:55pm UTC](https://forums.unrealengine.com/t/how-do-i-add-a-force-to-my-pawn-in-the-direction-it-is-pointing/486849/3 "2021-07-30T19:55:01Z")

</div>

hmm im not sure how to do that with the blueprints. the only function i can see that resembles that is GetActorTransform. but that seems to not be entirely dependable, as it seems to be misaligned with the mesh’s orientation.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 31, 2021, 7:58am UTC](https://forums.unrealengine.com/t/how-do-i-add-a-force-to-my-pawn-in-the-direction-it-is-pointing/486849/4 "2021-07-31T07:58:33Z")

</div>

You need to choose something on your pawn / character that is facing the way you want and use that vector to make the force / movement. For a character it might be

 ![345331-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/3/b63e672b2e4d4bf75847a3c8f00402ac02277a3d.jpeg)

For a pawn, going in the camera direction

![345333-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/c/bfc518189a3f7ca640efbddc79ec4ef90919ac66.jpeg)

Or perhaps for your ship, to preserve the current momentum:

 ![345334-screenshot-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/c/ebcf3d2671475705f0e03325c076e287da1b2d0d.jpeg)

Etc
