# Rotating the player camera

**URL:** <https://forums.unrealengine.com/t/rotating-the-player-camera/344059>\
**Category:** Character & Animation\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [January 14, 2016, 11:22am UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059 "2016-01-14T11:22:16Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 11:22am UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/1 "2016-01-14T11:22:16Z")

</div>

I’ve been stuck with this issue for the past 3 days or so – thought I’d finally push myself to ask for help:

When the player approaches and interacts with terminals in my current project, their camera is supposed to move closer to the terminal itself and rotate to be perpendicular to it.  
I’ve managed to get the camera to move fine, but it refuses to rotate. I’ve tried rotating the CapsuleComponent of which the Camera is a child, but that doesn’t work either.

I can, however, still rotate the camera using my mouse (was thinking about adding Angle Clamps to limit the movement of the camera once it rotates properly).

Here’s the function that controls the movement and (I had hoped) rotation of the player’s camera:

[http://i.imgur.com/n4Gy3cL.png](http://i.imgur.com/n4Gy3cL.png)

What’m I doing wrong here? I’m at a complete loss and everything I’ve tried hasn’t worked…

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 14, 2016, 11:40am UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/2 "2016-01-14T11:40:44Z")

</div>

Hey

Use a Matinee sequence to your camera, it will move the camera, rotate smoothly, anything you wants:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Good Luck

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 12:31pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/3 "2016-01-14T12:31:45Z")

</div>

I thought about using a Matinee but I’m unsure…  
The movement of my camera is based on the player’s location and an arrow component that exists in the Terminal actor.

By that I mean that the camera moves from the player’s position to the arrow in the terminal, so I’m unsure if that’s possible with a Matinee?

I’d prefer to not have to make a Matinee for each terminal I create if possible, so as to save time, but if I really don’t have any other option I guess I’ll need to.

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 14, 2016, 6:16pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/4 "2016-01-14T18:16:19Z")

</div>

Have you tried setting bUsePawnControlRotation on the camera to false?

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 6:48pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/5 "2016-01-14T18:48:30Z")

</div>

That worked! Thank you! I had a feeling it was something really simple that I was missing. ^^

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 14, 2016, 8:42pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/6 "2016-01-14T20:42:32Z")

</div>

Great! Happy to hear it 🙂 I converted my comment into an answer, if you’ve got what you need out of this thread.

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 9:12pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/7 "2016-01-14T21:12:44Z")

</div>

Would you also happen to know what causes the camera to snap back to it’s original Pitch after doing the MoveComponentTo?

The Yaw of the camera moves back to it’s original position just fine, but the pitch remains unchanged and snaps back to how it was only when I set UsePawnControlRotation to true.

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 14, 2016, 9:16pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/8 "2016-01-14T21:16:35Z")

</div>

Sorry…is this the move to terminal, or the move back to the player where the pitch isn’t reflecting what you expect?

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 9:58pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/9 "2016-01-14T21:58:57Z")

</div>

The move back. Moving to the terminal rotates fine.

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 14, 2016, 10:02pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/10 "2016-01-14T22:02:56Z")

</div>

In the “AttachTo” function, your attach type is “Keep World Position”. That means it’s going to keep the relative location & rotation offsets that it has at the moment you attach. Assuming you want the exact same location & rotation as the capsule component, you can use the Snap To Target attach type.

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 10:44pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/11 "2016-01-14T22:44:34Z")

</div>

Snap To Target seems to snap the camera to the origin point of the actors, though, which causes the camera to jump to that point before moving to it’s original position.

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 14, 2016, 10:57pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/12 "2016-01-14T22:57:33Z")

</div>

Can you just snap to target directly to the original position and avoid that jump?

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 14, 2016, 11:19pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/13 "2016-01-14T23:19:15Z")

</div>

I want a smooth transition (hence the MoveComponentTo nodes with both Ease inputs enabled) between the screen and the cameras original position, so any snapping is a no-go for me.

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 14, 2016, 11:36pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/14 "2016-01-14T23:36:17Z")

</div>

Gotcha. Yeah, you’ll want to keep your original attachment method then. I think you just need to set the controller rotation to be the same as camera before you set UsePawnControlRotation to true.

---

<div class="post-metadata">

**Author:** ![ClaryKitty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaryKitty](https://forums.unrealengine.com/u/ClaryKitty)\
**Post date:** [January 15, 2016, 12:41am UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/15 "2016-01-15T00:41:53Z")

</div>

I’ll keep experimenting, then.  
Thanks again. ^^

---

<div class="post-metadata">

**Author:** ![ScaroMascaro1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ScaroMascaro1](https://forums.unrealengine.com/u/ScaroMascaro1)\
**Post date:** [September 10, 2017, 2:16pm UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/16 "2017-09-10T14:16:10Z")

</div>

You could use a Timeline.

---

<div class="post-metadata">

**Author:** ![Squidy7777](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Squidy7777](https://forums.unrealengine.com/u/Squidy7777)\
**Post date:** [July 14, 2018, 1:05am UTC](https://forums.unrealengine.com/t/rotating-the-player-camera/344059/17 "2018-07-14T01:05:59Z")

</div>

I “dough” not comprehend
