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!