New update says I need override CreateReconsile method for prediction.
but code doesnt reach there if i use that.
Here my my corrent code. let me know if i did any mistake
Fishnet Version 4.3.1R.Pro
public struct MoveData : IReplicateData
{
public uint SendTick;
public Vector3 Direction;
public MoveData(Vector3 dir, uint sentTick)
{
this.SendTick = sentTick;
this.Direction = dir;
tick = 0;
}
private uint tick;
public void Dispose() { }
public uint GetTick() => tick;
public void SetTick(uint value) => tick = value;
}
public struct ReconsileData : IReconcileData
{
public Vector3 Position;
public Quaternion Rotation;
public ReconsileData(Vector3 pos, Quaternion rot)
{
this.Position = pos;
this.Rotation = rot;
tick = 0;
}
private uint tick;
public void Dispose() { }
public uint GetTick() => tick;
public void SetTick(uint value) => tick = value;
}