Did not get choppy movement fixed
Options
I have setup up my char with this settings:
Here is a video with my problem:
https://www.youtube.com/watch?v=92LtVdJWtB4
I setup the player so:
Here is an image of my setup:
https://forum.unity.com/threads/pun-2-cannot-fix-laggy-movement.707207/#post-4725896
The cyclist moves smoothly in SinglePlayer Mode
The Player moves with a fixedUpdate on a spline (dreamteck spline)
may be i need to deactivate the remote scripts on client side?
public class NetworkPlayer : MonoBehaviourPunCallbacks, IPunObservable { private Vector3 networkPosition; private Quaternion networkRotation; private float smoothing = 10.0f; // Start is called before the first frame update void Start() { if(!GetComponent<PhotonView>().IsMine) { Destroy(GetComponent<SplineFollower>()); tag = "OtherPlayer"; } networkPosition = transform.position; networkRotation = transform.rotation; } void Update() { if (!photonView.IsMine) { transform.position = Vector3.Lerp(transform.position, networkPosition, Time.deltaTime * smoothing); transform.rotation = Quaternion.Lerp(transform.rotation, networkRotation, Time.deltaTime * smoothing); } } /// <summary> /// Used to customize synchronization of variables in a script watched by a photon network view. /// </summary> /// <param name="stream">The network bit stream.</param> /// <param name="info">The network message information.</param> public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) { if (stream.IsWriting) { stream.SendNext(transform.position); stream.SendNext(transform.rotation); } else { networkPosition = (Vector3)stream.ReceiveNext(); networkRotation = (Quaternion)stream.ReceiveNext(); } } }i have tried changing the smooth factor, but without success, the movement is local horrible
Here is a video with my problem:
https://www.youtube.com/watch?v=92LtVdJWtB4
I setup the player so:
Here is an image of my setup:
https://forum.unity.com/threads/pun-2-cannot-fix-laggy-movement.707207/#post-4725896
The cyclist moves smoothly in SinglePlayer Mode
The Player moves with a fixedUpdate on a spline (dreamteck spline)
may be i need to deactivate the remote scripts on client side?
0