Can't delay setting player position

I set the starting coordinates of the Player to the floor in the Spawn function, using the asynchronous method,

public async void SetPlayerPosition()

{

//Do something

await Task.Delay(100);

// set player position

}

It does not work well. if I delete await Task.Delay(100), it works well.

Best Answer

  • Luke_Sta
    Luke_Sta ✭✭
    Answer ✓

    You should not use async or coroutines for gameplay code with Fusion. Use FixedUpdateNetwork and TickTimer instead.

Answers

  • Luke_Sta
    Luke_Sta ✭✭
    Answer ✓

    You should not use async or coroutines for gameplay code with Fusion. Use FixedUpdateNetwork and TickTimer instead.