private void FixedUpdate() { if (NetworkProfile.BeginMatch && PlayerHaveNewPosition() && i == 5) { PositionPacket PositionPacket = new PositionPacket(transform.position.x, transform.position.y, transform.position.z, PlayerCharacterController.GetPitch(), PlayerCharacterController.GetYaw()); NetworkManager.SendPacket(PositionPacket); i = 0; } if (i == 10) { i = 0; } WriteCurrentPosition(); i++; }
/// <summary> /// Перемещение камеры /// </summary> private void LateUpdate() { //Поворот камеры SetRotateAngle(m_PlayerCharacterController.GetYaw(), m_PlayerCharacterController.GetPitch(), m_PlayerCharacterController.rotationSensivity); }