It doesn’t work quite right. The camera becomes very jittery, especially if you are moving the mouse diagonally. Also, the player model keeps walking in front of the camera while moving. I have damping set to zero, and re-centering disabled.
The only thing I can think of is to use the Third Person Follow in the Virtual Camera. Set the object to follow to be an empty GameObject attached to the character maybe 10 or 12 units ahead of the character, and adjust the framing settings to put the camera between the player and the follow object.
It’s probably worth asking if cinemachine is even meant to support a first person view? I looked around a bit online, and it seems pulling this off requires an extensive amount of customization and tweaking, including scripts to properly handle mouse movement.
I did try using Third Person Follow, with the focus a bit further in front of the player. Sadly, the result was the same as using Hard Look At.
What is confusing is that there doesn’t seem to be a way to fully turn off damping. I set every damping related field to zero, but the camera still pulls back when the character moves.
Also, there is a lot of jittering and random repositioning when moving the mouse, as if the x and y axis are competing for control? Not sure how to explain it.
played around a bit more with different combinations. I think Framing Transponder and POV works the best, its just a matter of finding the sweetspot with the settings.
Turns out the jitter was because I forgot to add and hookup the Input Provider. Once I added the component, the mouse controls became much better.
I now have it so that the camera is in first person, and the player can look down and see their body. The issue remains the clipping. during certain animations, the characters head will clip into the camera and become visible form the inside. Also, if you spin the mouse around, you can see your characters face. I think I can fix this by adding a method to the free look state to spin the player in the direction of the horizontal input.
I call it from within the if statement, otherwise the body won’t rotate if the player isn’t moving. The same effect is achieved by calling FaceCameraDirection() at the beginning of the method, of course. Im not sure which way is better, I only did it this way to hedge against issues down the road, although it probably doesn’t matter which way it’s done.
With this, the body will turn to face the camera direction, so FPS view looks more natural. Im still getting a lot of clipping when the head moves in front of the camera. Im wondering how other games do this? Should I make the head a separate game object that doesn’t get rendered by the freelook camera?