Search Unity

Why does my Player go invisible when not moving and flashes when moving?

Discussion in 'Multiplayer' started by Epic-Username, Jul 19, 2015.

  1. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    339
    I am currently following this tutorial because i'm new to multiplayer: http://www.paladinstudios.com/2013/07/10/how-to-create-an-online-multiplayer-game-with-unity/

    When the player is not moving it goes invisible and when the player moves it flashes, this started happening ever since i added this:
    Code (CSharp):
    1. private void SyncedMovement()
    2.     {
    3.         syncTime += Time.deltaTime;
    4.         GetComponent<Rigidbody>().position = Vector3.Lerp(syncStartPosition, syncEndPosition, syncTime / syncDelay);
    5.     }
    This is really annoying because i cant continue on the tutorial until this is solved, i think its an old one so some things could be wrong.
     
  2. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Well for starters, the prefix you used "Unity Multiplayer" is referred to the new UNet multiplayer, to help users find topics related to the new multiplayer feature, while that tutorial is for the old RakNet networking system. So you should probably remove that from the title, to avoid confusion. :)

    Anyway, that tutorial is great for the old multiplayer, I followed it myself a long time ago but I don't remember much. I think people will need a bit more of your code to see why its not working, or perhaps if you followed to the letter and its still not working then maybe there's been changes rendering the tutorial not completely compatible? Don't take my word for it but it happens sometimes.

    If you wanna get familiar with the new multiplayer, take a look at the manual, its really easy to get started with. The only problem is, its fresh so not much tutorials or specific documentation yet. :)