mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
visualize networktime.time delta in height
This commit is contained in:
parent
bbc908b349
commit
67657100aa
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user