Hard Lock to Target Body Camera Setting Explained in Unity’s Cinemachine
Objective: To understand what the Hard Lock to Target virtual camera is in Unity’s Cinemachine and how to use it.
The simplest of all the Body camera settings in Cinemachine, Hard Lock to Target uses the ‘Follow’ targets position. The ‘Follow’ targets position essentially acts as a mount point for Cinemachines virtual camera. There is no deviation in this cameras movement from the ‘Follow’ target (apart from a damping effect).
Hard Lock to Target Requires a Follow Target
If you are going to be using this setting for your virtual camera, then you must have a ‘Follow’ target as shown in the error below:
Camera Will Snap Back if You Try to Adjust it
If you try to move the cameras location, maybe try to create an offset position you will notice that it simply snaps back to the Hard Lock to ‘Follow’ target:
As with the other body options, this camera type has a damping setting but with less editable options. Generally we would be be able to adjust the X, Y and Z axis damping individually, but with this the options are limited my friend!
How Would We Make Changes at Runtime Through Scripting?
Take a look at this previous article which covers this.