Create 1st person camera that follow head of character and restrict mouse movement

For some parts of my 3rd Person project I like to switch to the point of view of my character and keep this even while an animation is playing. I also want to restrict the freedom of movement that the player has to just wiggle few degrees so that he still gets some feedback to mouse movements but basically has to follow the movements of my character. I added a second camera that I attach to a socket at eye position. This works and the camera follows every head movement, but as soon as I set View Min/Max Yaw/Roll/Pitch the camera is locked to these angles in world space - it always looks in the same direction no matter where my character is facing. Is there anything I can do to restrict camera movement relative to the the parent socket so that the player can only look X degrees left an right from where my character is currently looking?


You might have better luck adding relative rotation to the camera instead of adding controller pitch/yaw inputs. Then just clamp the values so it can’t rotate more than you allow it, and make sure the camera is attached to the player’s head.

Probably not the best approach, but hopefully will get the results you’re after.

Thank you, that worked…