I'm using Cinemachine for a free look 3rd person camera and a virtual camera for a lock on cam.
I already have switched Cinemachine brains and movement types done, but I need the player to face the target and to keep the player on screen. The player is set as the "follow" with the target as the "look at"
public void LockOnMovement()
{
float nx = movementinput.x;
float ny = movementinput.y;
move3 = new Vector3(nx, 0, ny);
Vector3 rotateMovement = Quaternion.Euler(Cam.transform.rotation.eulerAngles.x, 0, 0).normalized * move3;
controller.Move(rotateMovement * runspeed * Time.deltaTime);
}
That's the players movement when locked on.
cam
is the camera the Cinemachine brains are controlling.