visualize networktime.time delta in height

This commit is contained in:
mischa 2024-09-24 13:33:11 +02:00
parent bbc908b349
commit 67657100aa

View File

@ -210,6 +210,8 @@ protected virtual void UpdateServer()
}
}
double lastNetworkTime;
protected virtual void UpdateClient()
{
// client authority, and local player (= allowed to move myself)?
@ -233,8 +235,12 @@ protected virtual void UpdateClient()
if (debugDraw)
{
// visual debugging
double delta = NetworkTime.time - lastNetworkTime;
lastNetworkTime = NetworkTime.time;
Debug.DrawLine(from.position, to.position, Color.white, 10f);
Debug.DrawLine(computed.position, computed.position + Vector3.up, Color.white, 10f);
Debug.DrawLine(computed.position, computed.position + Vector3.up * (float)(delta * 100), Color.white, 10f);
}
}
}