Search Unity

  1. Full schedule for #UniteBerlin is now available! Featuring talks on our roadmap, hands-on labs and much more! Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

unity did not find target for sync message

Discussion in 'Multiplayer Networking' started by FoxCastz, May 11, 2018.

  1. FoxCastz

    FoxCastz

    Joined:
    Jun 18, 2015
    Posts:
    68
    I am getting this message whenever I use transform.position = new Vector3(whatever coordinates);

    The message appears on the client players only and the client is synced via NetworkTransform Character Controller synchronization. I do not get the error when moving around normally, but as soon as the client character is moved using transform.position, then the client is thrown into a random position and the yellow error message "unity did not find target for sync message" appears.

    The client is Local Player Authority in Net Identity.

    Other Notes:
    The issue does not occur when Network Transform is syncing Transform, but Transform syncs cannot use interpolation to smooth movement like syncing character controllers or rigidbodies can.
     
  2. FoxCastz

    FoxCastz

    Joined:
    Jun 18, 2015
    Posts:
    68
    good help, so fast, much useful forum.
     
  3. thesupersoup

    thesupersoup

    Joined:
    Nov 27, 2017
    Posts:
    25
    There's not a lot of info to go off of from the OP, but I am curious: are you syncing the position as an RPC?
    Something like:
    Code (CSharp):
    1. {
    2.      if(isLocalPlayer)
    3.      {
    4.                if(Input.GetButton("Movement Axis")
    5.                     CmdUpdatePos(this.gameObject.transform.position);
    6.      }
    7. }
    8.  
    9. [Command]
    10. void CmdUpdatePos(Vector3 nPos)
    11. {
    12.      RpcUpdatePos(nPos);
    13. }
    14.  
    15. [ClientRpc]
    16. void RpcUpdatePos(Vector3 nPos)
    17. {
    18.      this.gameObject.transform.position = nPos;
    19. }
    Also, I wish I could be of more help regarding NetworkTransform, but I found it to be cumbersome and unwieldly. I'm currently using Smooth Sync: https://assetstore.unity.com/packages/tools/network/smooth-sync-96925

    It's drag-and-drop easy to work with. You shouldn't need to send an Rpc with the position update either, it should just interpolate from one position to the next.
     
  4. FoxCastz

    FoxCastz

    Joined:
    Jun 18, 2015
    Posts:
    68