NT try sync in late update

This commit is contained in:
vis2k 2023-03-12 23:04:55 +08:00
parent 844fe69e11
commit dbaafd6a9b

View File

@ -44,7 +44,10 @@ public class NetworkTransformReliable : NetworkTransformBase
protected TransformSnapshot last;
// update //////////////////////////////////////////////////////////////
void Update()
// movement components may change position in Update().
// use LateUpdate to always sync after user script position changes.
// otherwise the order fighting may show jitter.
void LateUpdate()
{
// if server then always sync to others.
if (isServer) UpdateServer();