Desync players with Photon 2

Hello

I am doing my own FPS game and for multiplayer i am using Photon 2 (free). When i am testing the game with myself ( unity editor instance and build one on my PC) it seems like its running fine, i have ThinkPad labtop so anyway its running like 40-50 fps and about 30 ping.
my FPS formula

fpsTimer += Time.unscaledDeltaTime;
///fps
info.GetComponent<TextMeshProUGUI>().text = ((int)(1f / Time.unscaledDeltaTime)).ToString();
///ping
info2.GetComponent<TextMeshProUGUI>().text = PhotonNetwork.GetPing().ToString();

this is running in Update method in PlayerController and updating every 0.5 seconds.
As i said, when i am trying it on my labtop it runs fine, but when i test it with someone with gaming pc (fps about 700+ by code calculation) we have rly desync positioning of the player.

I am using common photon components , like object Player has PhotonView and also Photon Transform View , in the start of the game i do PhotonNetwork Instantiate players.

When the game starts , i see his movement very chopped and after some time he is appearing on random spots on the maps , its like moving extremnly fast or extremnly chopped, also even he is staying on the same place on his computer. I am using character controller for moving (instead of pushing rigidbody). My movement is executed during LateUpdate().

 private void LateUpdate()
 {
     /*if(this.onElevator)
     {
         if(!inputController.PlayerHoverThisFrame() && !inputController.PlayerJumpedThisFrame())
         {
             moveVector.y = -0.5f;
         }
     }*/

     if (isMultiPlayerInstance)
         if (!this.PV.IsMine)
             return;

     if (!GamePaused)
     {

         if (!playerRelocated && isAlive)
         {
             controller.Move(moveVector * Time.deltaTime * playerSpeed);
             if (controller.isGrounded)
             {

                 if (playerSpeed < GlobalVariables.WALK_SPEED + 1f)
                 {
                     if (moveVector.x > 0.001f || moveVector.z > 0.00f || moveVector.x < -0.001f || moveVector.z < -0.00f)
                     {
                         if (!moveSound.isPlaying)
                         {
                             //walking 
                             if (moveSound.clip != sprint1)
                             {
                                 moveSound.clip = sprint1;
                             }
                             else
                             {
                                 moveSound.clip = sprint2;
                             }
                             moveSound.Play();
                         }
                     }
                 }
                 else if (playerSpeed > GlobalVariables.WALK_SPEED + 1f)
                 {
                     if (!moveSound.isPlaying)
                     {
                         //walking 
                         if (moveSound.clip != sprintBoostSound)
                         {
                             moveSound.clip = sprintBoostSound;
                             moveSound.Play();
                         }
                     }
                 }
             }
         }
         else
             playerRelocated = false;

         rotXSensibility = GlobalVariables.MOUSE_ACCELERATION_X;
         rotYSensibility = GlobalVariables.MOUSE_ACCELERATION_Y;
         Vector2 rot = inputController.GetMouseDelta();
         rotX -= rot.y * rotXSensibility * Time.deltaTime;
         rotX = Mathf.Clamp(rotX, verticalDownLimit, verticalUpLimit);
         rotY += rot.x * rotYSensibility * Time.deltaTime;
         Quaternion rotation = Quaternion.Euler(rotX, rotY, 0);
         cameraPointTransform.rotation = Quaternion.Euler(rotX, rotY, 0);
         playerBodyTransform.rotation = Quaternion.Euler(0, rotY, 0);

         /// shooting and melee
         #region 
         if (this.isAlive)
         {
             if (inputController.PlyerMadeMeleeThisFrame() && !melee)
             {
                 gunController.MeleeAtack();
             }

             melee = gunController.GetPerformingMelee();

             if (inputController.PlayerFiredThisFrame() && !gunController.IsShooting() && !melee)
             {
                 if (gunController.GetGunType() != GlobalVariables.GunType.Charger)
                 {
                     gunController.Shoot(cameraPointTransform.position, cameraPointTransform.forward, 1000f,Time.deltaTime);
                     RaycastHit hit = gunController.GetHit();
                 }
                 else
                 {
                     this.redGunCanShot = gunController.redGunChargingProcess(Time.deltaTime);
                     if (isMultiPlayerInstance)
                         this.redGunCanShot = gunController.RedGunCanShoot;
                     if (redGunCanShot)
                     {
                         gunController.Shoot(cameraPointTransform.position, cameraPointTransform.forward, 1000f, Time.deltaTime);
                         gunController.redGunChargingReset(true);
                     }

                 }
                 // Debug.Log(hit);
             }
             else
             {
                 if (gunController.GetGunType() == GlobalVariables.GunType.LightningGun && !inputController.PlayerFiredThisFrame())
                     gunController.yellowGunReset();
                 redGunCanShot = false;
                 if (gunController.GetGunType() == GlobalVariables.GunType.Charger)
                     gunController.redGunChargingReset(false);
             }


             /* if (!playerRelocated)
                  controller.Move(moveVector * Time.deltaTime * playerSpeed);
              else
                  playerRelocated = false;
             */
             if (inputController.PlayerAltFireThisFrame() && !melee)
             {
                 playerRelocated = gunController.AltShoot(gameObject.transform);
                 if (this.isMultiPlayerInstance)
                     playerRelocated = gunController.PlayerRelocated;
             }
         }
         #endregion
     }
 }

Does anybody has any idea why this could be happening? My first guess , maybe change my LateUpdate to FixedUpdate , or maybe i am doing tottaly wrong something.

Thank you for help guys

What is the ping of the other player? Is it stable or fluctuating a lot?
It could be a network issue of course.

You could also try one of the samples that come with the PUN 2 package. If it’s similarly choppy, it’s more likely a network issue. If it’s OK, then maybe your code is not working well with the provided components. They are a basic implementation and should be understood and customized for your game in best case.

Alternatively, try Fusion, which is more modern and has more samples available. It can be used quite simple but carries all the way to a more sophisticated implementation and gameplay.

hi, thank you for response

It seems like there is no connection problem , we both have fiber optic internet with speed over 300mbps , with ping 30 at maximum. It has to be something with the code, but i dont know what could be the problem.

Most of the time, the local network is not great but in your case, it doesn’t sound like it.
Did you try some of the demos in the package?

Hello , sorry for late answer , i just wanted to be sure it was my fault. So for this main topic of this thread , it was error on my side, not network but misunderstanding concept of RPC calls , and i just programmed it wrong. So it was no connection or photon error. I just wrote it from zero again, and now it works fine. Hoverew if i can ask

What is the best practice to make moveable objects via network. Like not players, but objects on map. For example some random cube. I come to the cube and i hit it with with physics. I know i can send RPC to my clone on the other clients to hit it same way , but as far as i know , the physic is not deterministic in unity.
It means the result of the way that cube is hit (and moved) could not be the same in my client and in other client. So how this things are made usually?

My first thoughts => room owner can instantiate network objects to map with PV and PV Transform , but then what happend when the room owner leaves and ownership is moved to another player. I think the instances created by original owner will dissapear.

So what is the best practice for this things? (another example, Flags in capture the flags etc)

Thank you