Hi, I'm trying to implement networking in my game, and i'm still learning about uNet. I'm doing a little tank game, and i'm trying to sync the rotation of turret of each player. My problem is that the turret's rotation of the other player sync correctly on client but not on host. It seems that the syncVar of the other player is not updated on host. I don't understand what is the problem. Code (CSharp): using UnityEngine; using System.Collections; using UnityEngine.Networking; public class NetworkPlayer_SyncTurret : NetworkBehaviour { [SyncVar] public Quaternion syncTurretRotation; public Transform turret; void FixedUpdate () { TransmitRotation(); if(!isLocalPlayer){ turret.rotation = Quaternion.Lerp (turret.rotation,syncTurretRotation,Time.deltaTime*15); } } void TransmitRotation(){ if(isLocalPlayer)syncTurretRotation = turret.rotation; } } Thanks for your help.
Hi ! A SyncVar is updated when the server change the value. In other words if you update the value from a client it will be not sync.