Can anyone help me explain this phenomenon?

Options
vimrzhang
vimrzhang
edited November 2022 in Fusion


I use Host mode, this is my code to click jump button

if (_isJump)
{
    _isJump = false;
    _networkInputData.Buttons |= NetworkInputData.BUTTON_JUMP;

    Debug.Log("Start Jump"+Runner.Simulation.Tick);

}
input.Set(_networkInputData);

On FixedNetworkUpdate

if (inputs.IsDown(InputHandler.NetworkInputData.BUTTON_JUMP))
{
    Debug.Log($"Player{player.playerID} Receive input Data: OnJump" + Runner.Simulation.Tick );
    onJump = true;
}


This is the final result log.

When I click jump on Host, The left is the host, the right is the client.

When I click jump on Client, The left is the host, the right is the client.


Question?

  1. When I click jump on the client, "Runner.Simulation.Tick" of the message received by the client and the host is the same?
  2. When I click jump on the client, Why does client update execute multiple times, is there any setting to turn off this function?
  3. When I click jump on Host,Why the tick time of the client is larger than that of the host and keeps increasing?

thank you!