Skip to content

Instantly share code, notes, and snippets.

@Yecats
Created October 16, 2019 03:46
Show Gist options
  • Select an option

  • Save Yecats/5175219abf2345074e66784b3f5349e9 to your computer and use it in GitHub Desktop.

Select an option

Save Yecats/5175219abf2345074e66784b3f5349e9 to your computer and use it in GitHub Desktop.
Part 7
private void LateUpdate()
{
//constantly updates the position of the camera based on the move and rotation targets
CameraRig.transform.position = Vector3.Lerp(CameraRig.transform.position, _moveTarget, Time.deltaTime * _internalMoveSpeed);
CameraRig.transform.rotation = Quaternion.Slerp(CameraRig.transform.rotation, _rotationTarget, Time.deltaTime * _internalRotationSpeed);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment