MirrorNetworking / MirrorNetworking/Mirror

NetworkTransformReliable is buggy when assigning/releasing client authority

Open
#3,877 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.3k
Forks
870
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Assign and release client authority causes NetworkTransformReliable to flicker and leave object transform out of sync. Not sure about SERVER-CLIENT config, but the bug is prominent in HOST-CLIENT config.

[IMPORTANT] How can we reproduce the issue, step by step:
Please tell us how to reproduce your issue, STEP BY STEP, with one of our built in examples.
-> Run HOST and connect CLIENT to the HOST
-> On HOST assign client authority to and object
-> BUG!!! On CLIENT the object flickers - momentarily jumps to a weird place and comes back
-> Move the object on HOST
-> Transform is in sync on CLIENT
-> Release authority on HOST
-> BUG!!! The onbject flickers again on CLIENT

Another sceneario:
-> On CLIENT -> assign authority and start updating transform
-> On HOST the object is in sync
-> On CLIENT release authority
-> BUG!!! On CLIENT the object jumps to a random location. This is not deterministic, but happens very often

This problem makes NetworkTransformReliable pretty useless in HOST-CLIENT config where authority used to manipulate objects transforms from client side.

The bug can be addressed by changing NetworkTransformReliable to NetworkTransformUnreliable, which works as expected.

Expected behavior
Setting client authority must enable transform propagation from client to server without going out of sync randomly.

Desktop (please complete the following information):

  • OS: Windows
  • Build target: UWP
  • Unity version: 2022.3
  • Mirror branch: 89.8.0

Additional context
I think the bug is present is HOST-CLIENT config. SERVER-CLIENT config is likely not affected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with NetworkTransformReliable and compare its behavior with NetworkTransformUnreliable, which the report says works as expected. Reproduce the HOST-CLIENT authority assignment and release sequences, then verify that client and host transforms remain synchronized without flickering or random jumps.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.