# Camera acts weird when looking up

**URL:** <https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576>\
**Category:** Cinematics & Media\
**Tags:** bug, unrealengine4, unreal-engine, walls, question\
**Created:** [October 26, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576 "2019-10-26T16:24:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 26, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/1 "2019-10-26T16:24:23Z")

</div>

Whenever I look up to the sky, the camera just looks down immediately, and this happens only after ending the overlap collision from walls that has a tag name I put so I could slide on it.  
Here is a link showing what’s happening:

[Video] [Imgur: The magic of the Internet](https://imgur.com/a/wz2IDU8)

And down here is the blueprint for it

 ![291160-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/5/c157dd938c7c4434a222db355713833e46e634e4.png)

---

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 26, 2019, 5:14pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/2 "2019-10-26T17:14:17Z")

</div>

Found a fix for it,  
On the Character Details, go into “Use Controller Rotation Pitch” by default it’s unchecked, just check it and compile.

 ![291184-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/0/f300728eaefaea3589aa9749f1e75e4c561ab96c.png)

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 26, 2019, 5:42pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/3 "2019-10-26T17:42:09Z")

</div>

I think I may have spotted the cause(s) of your problem. Going through the video frame by frame, I have noticed that the camera rotation is reset to the old angle it had while wall-running. This may be caused by using the pawn rotation and changing the controller rotation with it. This will result in their rotations being out of synch. There is some weird behaviour with the CharacterMovementComponent when looking straight up. While you can use the controller rotation to force the two rotations to be synchronised (you already figured that out), you might want to work with one rotation at a time, either the controller or the pawn.

**EDIT:**

_Why not just force the pitch?_

**There will probably still be one frame when looking up in which the roll of the camera is set to -20/20.**

---

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 26, 2019, 7:43pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/4 "2019-10-26T19:43:46Z")

</div>

How exactly do I fix it without forcing the pitch?  
Could you please explain step by step because I’m new to this ^^  
Thanks c:  
(BTW: the bug also happens if i look very down too)

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 26, 2019, 8:58pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/5 "2019-10-26T20:58:02Z")

</div>

If you use a GetControlRotation node instead of the GetActorRotation node, things should work out. I have not done any tests on my end though, so if problems persist, tell me. =)

(Yeah the way character movement is handled can be odd. With characters starting to walk in the opposite direction while looking up/down. It’s a bit of a mess at times.)

---

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 27, 2019, 5:51am UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/6 "2019-10-27T05:51:39Z")

</div>

So I used GetControlRotation, and it worked perfectly, however though, it doesn’t reset the rotation anymore when I get off of a wall

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 27, 2019, 1:46pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/7 "2019-10-27T13:46:15Z")

</div>

Ah yeah, makes sense. The lerp now reads the rotator position, which has the roll, and thus will stay at the same roll. Where you are connecting GetControlRotation to the A-pin on the lerp node, set the roll to 0. (Just like you did with the -20/20)

If that doesn’t work you can use another Timeline node, set the roll to 0, and connect the two EndOverlaps to it.

---

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 27, 2019, 3:22pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/8 "2019-10-27T15:22:54Z")

</div>

I’ve tried what you said, it does reset the rotation but only for the left side,if i try on the right side, it doesn’t reset it, doesn’t matter which side i try, it’s only the right side that doesn’t rotate and instead make a 360 turn around lol

 ![291231-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/d/c9d6a09d35e8bbe97ad7ea00c8bb4313cfb75859.png)

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 27, 2019, 3:39pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/9 "2019-10-27T15:39:19Z")

</div>

oh… lol!  
set the “shortest path” checkbox to true, tell me if that works =)

---

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 27, 2019, 3:46pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/10 "2019-10-27T15:46:40Z")

</div>

Yes it worked ^^  
the only little issue is that if I’m on the same wall on the left side, then i jump and come back to it on the right side, if i do it quickly, the camera acts weird and sometimessss doesn’t reset the rotation

EDIT:  
after putting all “shortest path” on all of the nodes, it doesn’t act weird anymore

Thanks so much ^^

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 27, 2019, 3:59pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/11 "2019-10-27T15:59:52Z")

</div>

A setup similar to this might work better. Obviously you will still want to do your checks up front for the tag and whether the pawn is falling. You might also want to check if desired roll and GetControlRotation x are the same before interpolating on the tick. =)

 ![291233-rotate.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/d/dbd65a633ec58a2898f827adb044e880c8dd782f.png)

---

<div class="post-metadata">

**Author:** ![Lily\_oxox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lily\_oxox](https://forums.unrealengine.com/u/Lily_oxox)\
**Post date:** [October 27, 2019, 11:14pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/12 "2019-10-27T23:14:14Z")

</div>

You’ve helped me so much ^^  
Thank you a lot!

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 27, 2019, 11:54pm UTC](https://forums.unrealengine.com/t/camera-acts-weird-when-looking-up/457576/13 "2019-10-27T23:54:16Z")

</div>

You’re welcome! =)
