# How to change the direction of my pawn with the camera direction

**URL:** <https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint, question\
**Created:** [August 21, 2022, 7:45pm UTC](https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205 "2022-08-21T19:45:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![goobo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@goobo](https://forums.unrealengine.com/u/goobo)\
**Post date:** [August 21, 2022, 7:45pm UTC](https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205/1 "2022-08-21T19:45:28Z")

</div>

Hello everyone, I am making my first game, I followed some tutorials and I decided to make it simple: A sphere that moves with torque. (by hideo kojima)

My sphere (a pawn) moves in the right direction, the camera is good, but I try to make it so that when the camera looks, for example, behind me, the sphere changes direction and moves backwards even if i keep pressing the “w” key.

I don’t know if I’m making myself understood but basically I’m trying to replicate Hammond’s gameplay in Overwatch if you’ve ever played with that thicc boy.

I saw that the character movement component like “orient rotation to movement” could help me accomplish this but I’m a pawn, so I don’t have that component and making my sphere a character isn’t weird since I’m just a sphere?

So I tried to fiddle with it, but I can’t get “orient rotation to movement” to work with my sphere even if I make it a character, so i got back to a pawn. I’m of course missing the obvious, I would appreciate a lantern from a charming traveler to light my cave.

**This is my ball movement**

 ![ballmovement](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/f/6bfb0f3e6bbacab72f368abffece1ed13b9549f1.png)

**This is my camera movement**

 ![cameramovement](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/e/83e850a8795c63e41030feb30367457f0bbb14b6.png)

**What the prototype looks like**

 ![ball.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/1/a01e716841afe153f8af562ce23ff9b7a7234fe5.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 21, 2022, 9:03pm UTC](https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205/2 "2022-08-21T21:03:35Z")

</div>

Use `Right Vector` to roll a ball with torque in the direction it’s facing. Or the right vector of the camera if you want to roll it along that way.

* * *

The way it’s set up right now, you’re using world direction.

---

<div class="post-metadata">

**Author:** ![goobo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@goobo](https://forums.unrealengine.com/u/goobo)\
**Post date:** [August 22, 2022, 12:26am UTC](https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205/3 "2022-08-22T00:26:18Z")

</div>

Thank you for your reply king, so i have tried to follow your advice with the help of this video ==\> [WTF Is? Get Right Vector in Unreal Engine 4 ( UE4 ) - YouTube](https://youtu.be/O-zEzdwcpuc) and other topic on this forum.

**My code now:**

 ![ballmove2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/a/15a51c28f2c7387574e590df13d6068784b29fc8.png)

I dont think its the right way but i managed to get something. I checked ‘Use Controller Rotation Yaw’ on my BP\_Ball,

 ![BALL2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/7/9b75d19650c6c141763fc66d035a47311dd5a281.png)

If I look exactly behind me, i can press ‘w’ to go in the direction the camera is facing. Great. But if i still look behind and slightly to the side, the ball is following the right vector **[in red]** (i presume ?) and not really the direction my camera is facing **[in blue]**

 ![image_2022-08-22_022048862](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/4/c243667ec9c6f7eba38849a9f643ca32a0e40301.jpeg)

I kinda want it to act like this character on this game: [49 ELIMS! 18K DMG! HARBLEU HAMMOND GAMEPLAY OVERWATCH SEASON 35 TOP 500 - YouTube](https://youtu.be/gNsbrc58xaI)

I think i missed your point @Everynone

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 22, 2022, 3:54am UTC](https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205/4 "2022-08-22T03:54:29Z")

</div>

You’re not using the right vector correctly. Use the `entire` vector. And use the vector of the camera, not the vector of the ball.

The ball is rolling so its right vector is all over the place unless you unrotate the transform.

Example using `Right` of the springarm:

> [@Third Person Camera in Rolling Template](https://forums.unrealengine.com/t/third-person-camera-in-rolling-template/497447/4):
>
> It could be as simple as this: But may need to be adjusted depending on what else is needed: but adding torque in the right direction is where Im having trouble You, kind of, solved it yourself - the Right Vector is key when working with torque.

* * *

Also, it may be difficult to replicate **this** movement with torque only, you may need to add impulses as well (or instead!) and / or set up physical materials to boot. Check this excellent post out:

> [@Make Ball roll fully with torque](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/3):
>
> I wonder why most people wants to roll a ball with torque. Just use ADD FORCE (push it!) here the method I use: [[Unreal Engine - Controlling a Physics ball] ](https://www.youtube.com/watch?v=P4by9YnkeeU) I don’t use Character BP…I work with a custom PAWN actor. I apply the force to the ball static mesh component…I dont care the position or state of the pawn in the world…I work with the ball itself I have a center ball pivot (scene component) that I update with the center of the ball all the time, so no matter the balls orien…

---

<div class="post-metadata">

**Author:** ![goobo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@goobo](https://forums.unrealengine.com/u/goobo)\
**Post date:** [August 22, 2022, 1:52pm UTC](https://forums.unrealengine.com/t/how-to-change-the-direction-of-my-pawn-with-the-camera-direction/632205/5 "2022-08-22T13:52:16Z")

</div>

Thanks a lot, managed to get it working following the second video you posted + adding force is more the feeling i was looking for, have a nice day king
