Rotate Player Head to Camera

I have a first person game and want to achieve several things:

1: The players head rotates to where the camera is looking to.
2: The player head cannot turn more than 45 degress to the left or right otherwise the rest of the body rotates. Otherwise the body will remain in the same position.
3: Other players can see if you are looking up, down, left, right, etc.
4: You should be able to look up and down 89 degrees since the limit 80 degrees and 90 is not possible.

A very good example for this is the way the minecraft camera works. This is basically exactly what I want to achieve.

1 Like