# How to allow a 3rd person character to face where the mouse is aiming

**URL:** <https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885>\
**Category:** Blueprint\
**Tags:** controller, unreal-engine, Blueprint, question\
**Created:** [March 22, 2014, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885 "2014-03-22T14:32:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denjino](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denjino](https://forums.unrealengine.com/u/Denjino)\
**Post date:** [March 22, 2014, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/1 "2014-03-22T14:32:24Z")

</div>

Id like to have a character walk forward, backwards and strafe sideways whilst the mouse pointer dictates what direction the character is facing.

---

<div class="post-metadata">

**Author:** ![anon71575017](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon71575017](https://forums.unrealengine.com/u/anon71575017)\
**Post date:** [March 22, 2014, 4:06pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/2 "2014-03-22T16:06:58Z")

</div>

Simply put your character as the Target for “Get Actor Location” and “Set Actor Rotation” and it will look at wherever your mouse is! I tested this as well to make sure it works.

 ![2002-schedule.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/4/f9436594e6832e540c898bf3c7fbe4c8e550d846.png)

If you don’t want debug lines to draw, then change the “Draw Debug Type” under “Single Line Trace for Objects” to “None”. As well, this Blueprint will only look at Static geometry (BSP brushes, etc.), so you may want to add more types to the “Make Array” node. Just click “Add pin” and select all of the things that you want to look at from the drop-down.

---

<div class="post-metadata">

**Author:** ![Denjino](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denjino](https://forums.unrealengine.com/u/Denjino)\
**Post date:** [March 22, 2014, 4:10pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/3 "2014-03-22T16:10:44Z")

</div>

Thank you so much guys. I tried Alexander’s solution first and that worked perfectly, all id need now is to create the strafe and walk backwards animations. Thank you ParralexLLC, ill try your solution too later.

---

<div class="post-metadata">

**Author:** ![anon71575017](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon71575017](https://forums.unrealengine.com/u/anon71575017)\
**Post date:** [March 22, 2014, 4:12pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/4 "2014-03-22T16:12:37Z")

</div>

Not a problem! If I need to clarify anything in my Blueprint I’ll be happy to assist you.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d09c732b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d09c732b](https://forums.unrealengine.com/u/anonymous_user_d09c732b)\
**Post date:** [March 22, 2014, 6:39pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/5 "2014-03-22T18:39:56Z")

</div>

Thanks so much! BUT… with my top down shooter game (WASD to move north, south, east, west) I needed the player to always face where the mouse was. This blueprint Parralex provided was a great solution! I had to add one more thing… a **Break Rot** and a **Make Rot**. This is because with the character would become inverted when mousing over tall objects. SOOOOO, Here is what I did to fix this! Hope it helps someone!

 ![2035-added_breakrot.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/1/0c1d874c4c53e16cc9335a30ceaa789624cb961e.jpeg)

---

<div class="post-metadata">

**Author:** ![anon71575017](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon71575017](https://forums.unrealengine.com/u/anon71575017)\
**Post date:** [March 22, 2014, 7:04pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/6 "2014-03-22T19:04:57Z")

</div>

For future readers, the additions that he made (Break Rot and Make Rot) are isolating the Yaw, which is the angle on the X,Y plane (Pitch is for the Z plane, while Roll is not used). This makes sure that the character is looking parallel to the ground, while keeping the surface direction intact. This is perfect for Top-Down Shooters. For a Sidescroller, you would want to isolate the Pitch, although you would need to figure out the Yaw for the direction that you want to face (left or right).

Thank you Zortalas for your contribution, I’m sure it will be helpful to someone!

---

<div class="post-metadata">

**Author:** ![DizzyWes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DizzyWes](https://forums.unrealengine.com/u/DizzyWes)\
**Post date:** [March 25, 2014, 10:32pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/7 "2014-03-25T22:32:24Z")

</div>

Hi Denjino,

If you simply what the character to face the direction in which the mouse is pointing, take a look at the **3rd Person Blueprint Template** and under the **Blueprints** folder for _My Character_, go to the _Defaults_ tab and search for **Pawn**. Check the _User Controller Rotation Yaw_ option and that will allow the pawn to face the direction the mouse is pointing.

Note: The character in this example doesn’t animate and rotate towards the camera, there would be a little more involved in this.

Hope this helps points you in the right direction (yes pun intended)!

-W

---

<div class="post-metadata">

**Author:** ![darkhemic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkhemic](https://forums.unrealengine.com/u/darkhemic)\
**Post date:** [March 28, 2014, 7:13pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/8 "2014-03-28T19:13:36Z")

</div>

Thank you Wes for this simple solution using Blueprint. I cross posted your answer under my question about creating a [3rd person shooter perspective](https://answers.unrealengine.com/questions/19985/how-do-i-create-a-third-person-shooter-camera-syst.html) like Gears of War. It’s one step closer to what many of us are trying to create without c++ coding.

---

<div class="post-metadata">

**Author:** ![Kuhnen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kuhnen](https://forums.unrealengine.com/u/Kuhnen)\
**Post date:** [April 18, 2014, 3:05pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/9 "2014-04-18T15:05:52Z")

</div>

Hey. I tried the solution for top down view… If I’m using the “top-down blueprint” template, I should put that blueprint in the MyCharacter actor, right?

I did it and the character keeps looking to a fixed point in my level, not where the mouse is. ☹

I’m attaching a screenshot of my graph. If anyone could point me at the right direction, I would appreciate it!

Thanks!

 ![4370-lookatmouse.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/f/24f21d3b6f96591b6c9f757ec6f30dc0e7d2a7ff.png)

---

<div class="post-metadata">

**Author:** ![Kuhnen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kuhnen](https://forums.unrealengine.com/u/Kuhnen)\
**Post date:** [April 18, 2014, 3:06pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/10 "2014-04-18T15:06:58Z")

</div>

nevermind. found my mistake… the multiplier to the World Direction was set to 0. 😛

---

<div class="post-metadata">

**Author:** ![Gender\_Bender](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gender\_Bender](https://forums.unrealengine.com/u/Gender_Bender)\
**Post date:** [June 27, 2014, 12:42am UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/11 "2014-06-27T00:42:04Z")

</div>

Hi I was wondering how you got the Strafe InputAxis to work? I was trying this out and got the character to look at and follow the mouse with W, but am having problem with strafing around. Any help would be much appreciated

---

<div class="post-metadata">

**Author:** ![Viipiir](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Viipiir](https://forums.unrealengine.com/u/Viipiir)\
**Post date:** [December 7, 2019, 3:27pm UTC](https://forums.unrealengine.com/t/how-to-allow-a-3rd-person-character-to-face-where-the-mouse-is-aiming/277885/12 "2019-12-07T15:27:15Z")

</div>

Hi, I’m very new to this, I’ve tried the above solution and my character still turns when I hit the S key. If I ever get this to work, will I have to make an animation to make his legs run backwards?
