Issue clamping pitch/yaw of camera

Hi there,

so I have a static camera tracking the player moving around.

I’m trying to put a limit on how much the camera can track the player on pitch/yaw.

This is what I have so far (this is a blueprint of my custom camera, inherited from CameraActor):

Which seems to work-ish. The problem happens when the yaw reaches clamped min/max bounds, the pitch starts to go higher in value for some reason. Bit hard to explain, so I made a little video: [CLICK HERE][2].

Notice how I have a clamp of 10 degrees, as soon as I go above or below that on the yaw the pitch goes up. If I adjust the clamp to 45 degrees, everything is fine within that range, but same thing as soon as I hit the limit the pitch goes up.

What I expect is the pitch to not move at all, if the look at rotation reaches the clamped bounds, it should just not rotate.

I’m not sure if I’m missing something like if angle > 180, subtract 360. I tried that, didn’t do much.

(Note that StartRot is just the initial rotation of the camera)

What am I missing?
Thanks for your help!

Have you tried removing this?

353531-screenshot-1.jpg

You have to totally exclude roll, or use it.

Hi, I tried clamping roll, and ignoring it (leaving it at 0), and hooking it up to the start roll, and using it directly from the look at, none made any difference…

So I don’t think this is a bug, looking at it more, its just that the camera is at a bit of an angle, so when the player goes to its left or right, the pitch has to adjust to look up at him. If I unclamp the Yaw, the pitch still happens, its just that when we combine the Yaw and Pitch rotation, it looks correct, but when the Yaw is clamped and the Pitch moves, it looks ‘off’ giving the impression that its doing the wrong thing… If I’m wrong please correct me.

One thing I thought I could do is if if the Yaw is clamped, don’t adjust the pitch anymore, whish seems to work good. Like so: