Camera pan according to roll rotation

Hi everybody!

I have a simple camera, it follows objects in the world. Sometimes, my camera is upside down, or 3/4 right. The roll (X) changes all the time.

On this camera, I have a simple pan blueprint (yaw and pitch). It works when the camera is straight (roll = 0). But, the pan is inverted when the camera is upside down. Normal so far.

Here, a wonderful sketch!

https://puu.sh/y1ZBi/88264b60a1.jpg

My question is, how to keep my yaw and pitch (Z and Y) always in the right direction, related to the roll (X) ? (-1 and 1 always at left and right or top and bot, and not inverted).

Thank you very much for help!

No idea? I should have listened to my vectors classes on high school…

if you use add rotation to your actor , user add relative rotation instead of add world rotation
and also you can ignore roll rotation on your actor too

You’re right!
I don’t know why I tried to do this with a “set”, plus a “world” rotation x)
Add local rotation for actor is the best way to achieve what I was looking for.

Thank you!

Hello there! I know it’s too late of a question. But could you tell me how you fixed this? I am having this exact issue right now. :frowning: I recently started learning Unreal and I am a completely new to the engine. Thanks in advance!