반응형
- 코드 작성
void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
stream.SendNext(transform.rotation);
}
else
{
Quaternion rotation = (Quaternion)stream.ReceiveNext();
float lag = Mathf.Abs((float)(PhotonNetwork.Time - info.timestamp));
transform.rotation = Quaternion.Lerp(transform.rotation, rotation, lag);
}
}
반응형