public void OnServerOutbound(NetEntitySnapshot _snapshot) { IntelEntitySnapshot snapshot = (IntelEntitySnapshot)_snapshot; snapshot.X = Transform.Position.X; snapshot.Y = Transform.Position.Y; snapshot.Z = Transform.Position.Z; }
public void OnClientInbound(NetEntitySnapshot _snapshot) { IntelEntitySnapshot snapshot = (IntelEntitySnapshot)_snapshot; positionAnim.SetTarget(new Vector3(snapshot.X, snapshot.Y, snapshot.Z)); if ((positionAnim.Target - positionAnim.Value).Length > 20) { positionAnim.SnapTo(positionAnim.Target); } }