Fixed issue with NetworkedTransform

This commit is contained in:
Albin Corén 2018-03-07 22:56:16 +01:00
parent 352c827b5d
commit c47a37b422

View File

@ -80,7 +80,10 @@ namespace MLAPI.MonoBehaviours.Prototyping
writer.Write(transform.rotation.eulerAngles.y);
writer.Write(transform.rotation.eulerAngles.z);
}
SendToServerTarget("MLAPI_OnRecieveTransformFromClient", "MLAPI_POSITION_UPDATE", writeStream.GetBuffer());
if (isServer)
SendToNonLocalClientsTarget("MLAPI_OnRecieveTransformFromClient", "MLAPI_POSITION_UPDATE", writeStream.GetBuffer());
else
SendToServerTarget("MLAPI_OnRecieveTransformFromClient", "MLAPI_POSITION_UPDATE", writeStream.GetBuffer());
}
}