Trying to sync up rotation... help?

So i used what i learned from your Merry Fragmas m-player tutorials, and used it as the bases to get my little learning game to work.

The issue i am having is that the players rotation is not syncing over. View video to see what is happening to me in game.

using UnityEngine;
using System.Collections;

public class PlayerNetworkMover : Photon.MonoBehaviour {
  
    public delegate void Respawn(float time);
    public event Respawn RespawnMe;
  
    Vector3 position;
    Quaternion rotation;
    float smoothing = 10f;
    float health = 100f;
    bool idle = false;
    bool run = false;
    bool initialLoad = true;

    Animator anim;
  
    void Start ()
    {
        anim = GetComponentInChildren<Animator> ();
        if(photonView.isMine)
        {
            GetComponent<AxisPlayerMove>().enabled = true;
            GetComponentInChildren<ARPGCameraController>().enabled = true;
            foreach(Camera cam in GetComponentsInChildren<Camera>())
                cam.enabled = true;
        }
        else{
            StartCoroutine("UpdateData");
        }
    }
  
    IEnumerator UpdateData()
    {
        if(initialLoad)
        {
            initialLoad = false;
            transform.position = position;
            transform.rotation = rotation;
        }
        while(true)
        {
            transform.position = Vector3.Lerp(transform.position, position, Time.deltaTime * smoothing);
            transform.rotation = Quaternion.Lerp(transform.rotation, rotation, Time.deltaTime * smoothing);
            anim.SetBool ("idle", idle);
            anim.SetBool ("run", run);
            yield return null;
        }
    }
  
    void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
    {
        if(stream.isWriting)
        {
            stream.SendNext(transform.position);
            stream.SendNext(transform.rotation);
            stream.SendNext(health);
            stream.SendNext(anim.GetBool ("idle"));
            stream.SendNext(anim.GetBool ("run"));
        }
        else
        {
            position = (Vector3)stream.ReceiveNext();
            rotation = (Quaternion)stream.ReceiveNext();
            health = (float)stream.ReceiveNext();
            idle = (bool)stream.ReceiveNext();
            run = (bool)stream.ReceiveNext();
        }
    }
  
    [RPC]
    public void GetShot(float damage)
    {
        health -= damage;
        if(health <= 0 && photonView.isMine)
        {
            if(RespawnMe != null)
                RespawnMe(3f);
          
            PhotonNetwork.Destroy (gameObject);
        }
    }
  
}

Don’t think its the best practice to run the update in a coroutine. Why not run it in Update()? At least only run it once per frame by using the yield wait for end of frame method. But still think you should move it to Update().

The Lerp seems fine though, not sure if it is the coroutine that somehow fucks it up.

would the issue have anything to do with, the original character controllers?

That could very well be. Dont know what scripts you got running… Remember to disable all movement/rotation code on views that do not belong to you.

yea it had something to do with my controller. ugh.

switched the controller to another set up, and it rotates just fine. a bit choppy, but works none the less!