Camera acts weird when looking up

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

And down here is the blueprint for it

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.

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.

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)

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.)

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

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.

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

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

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 ^^

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. =)

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

You’re welcome! =)