Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - xzkmxd

Pages: [1]
1
TNet 3 Support / How to set the Tnet timeout period.
« on: July 02, 2016, 07:54:39 AM »
How to set the Tnet connection timeout.

2
TNet 3 Support / Net3 serious BUG
« on: May 31, 2016, 06:55:30 AM »
Use Net long will this appear BUG .. This should be a very serious BUG.

3
TNet 3 Support / Re: Synchronization BUG
« on: May 28, 2016, 01:18:12 PM »
  1. void FixedUpdate()
  2.     {
  3.         transform.position = Vector3.Lerp(StartPos, EndPos, 50 * Time.fixedDeltaTime);
  4.     }
  5.  
  6.     void Start()
  7.     {
  8.         if (tno.isMine)
  9.         {
  10.             GetComponent<MeshRenderer>().material.color = Color.red;
  11.         }
  12.         else
  13.         {
  14.             Destroy(transform.Find("Camera").gameObject);
  15.         }
  16.         StartPos = transform.position;
  17.         EndPos = transform.position;
  18.         //Assets.handling.Game.ClinetPacketCreator.PlayerMove(TNet.TNManager.client, TNet.TNManager.client.playerID, transform.position);      
  19.         StartCoroutine(PeriodicSync());
  20.     }
  21.  
  22.     void Update()
  23.     {
  24.         Debug.Log("isMune:" + isMune);
  25.         if (tno.isMine)
  26.         {
  27.             StartPos = transform.position;
  28.             EndPos = StartPos + new Vector3(0, 0, 5 * Time.deltaTime);
  29.             //transform.position += new Vector3(0, 0, 5 * Time.deltaTime);
  30.            
  31.         }
  32.     }
  33.     #endregion
  34.  
  35.     [TNet.RFC(25)]
  36.     public void UpdateMove(Vector3 start,Vector3 end)
  37.     {
  38.         StartPos = start;
  39.         EndPos = end;
  40.     }
  41.  
  42.     public float updatesPerSecond = 100f;
  43.  
  44.     IEnumerator PeriodicSync()
  45.     {
  46.         for (; ; )
  47.         {
  48.             if (updatesPerSecond > 0f)
  49.             {
  50.                 //if (mList.size != 0 && (!onlyOwnerCanSync || tno.isMine) && Cache()) Sync();
  51.                 //Assets.handling.Game.ClinetPacketCreator.PlayerMove(TNet.TNManager.client, TNet.TNManager.client.playerID, transform.position);
  52.                 tno.Send(25, TNet.Target.OthersSaved, StartPos, EndPos);
  53.                 yield return new WaitForSeconds(1f / updatesPerSecond);
  54.             }
  55.             else yield return new WaitForSeconds(0.1f);
  56.         }
  57.     }

4
TNet 3 Support / Re: Synchronization BUG
« on: April 22, 2016, 09:11:56 AM »
The object is not controlled by the player, but it will always move. There will be a shake of the situation. Or I will send a project to you to see.

5
TNet 3 Support / Synchronization BUG
« on: April 20, 2016, 10:30:27 PM »
Tnet directly continues to move, sometimes shake the situation occurs, why mobile is transform.Translate (Vector3.forward * 5 * Time.deltaTime);

Pages: [1]