Quaternion.LookRotation resetting after use


I’m trying to have my camera look at an object for a few seconds, then I want the camera rotation to stay where it is, however it always resets back to the position before it started looking at the object.


Here’s the script:
(The Player.Instance.Disable/Enable are enabling and disabling the first person controller to stop movement)

	public GameObject lookatObject;

	private bool lookAt = false;
	private bool finished = false;

	private Quaternion rot;

	void OnTriggerEnter(Collider other) {
		if (other.tag == "Player") {

			if(lookatObject != null)





	IEnumerator LookAtObject()

		Player.Instance.Disable ();

		lookAt = true;

		yield return new WaitForSeconds(4);

		lookAt = false;

		Player.Instance.Enable ();

		Camera.main.transform.rotation  = rot;


	void Update()

		if (lookAt) {

			rot = Quaternion.LookRotation (lookatObject.transform.position - Camera.main.transform.position);
			Camera.main.transform.rotation = rot;



After the first person controller clue from @Bunny83 I managed to find that the MouseLook script holds the rotation of the character and the camera in these variables:

    public Quaternion m_CharacterTargetRot;
    public Quaternion m_CameraTargetRot;

All it took was to reset them to the proper values after I was done moving the camera and character about. First person controller holds an instance of MouseLook, so just a few public variables later, everything works great.

Cheers for the help @Bunny83 and @Hellium I really appreciate it!