Skip to content

Short desync of ClientNetworkTransform after ownership change with half precision enabled #2628

@Daniel4144

Description

@Daniel4144

Description

I've mentioned this issue here briefly: #2549 (comment)

When the ownership of a NetworkObject with a ClientNetworkTransform is changed during movement, the object jumps to a previous position for maybe one frame. It jumps back to its expected position immediately. This only happens with half precision.

I am aware that the ownership change cannot be totally smooth during movement without interpolation due to the network delay.

Reproduce Steps

  1. Start a host and a client instance of the attached project.
  2. The moving object in the scene changes ownership every second.
  3. Observe the movement during ownership change

In case that's relevant: I am using a symlinked copy of the Unity project for multiplayer testing and have only tested in the editor play mode.

netcode-issue-networktransform-returnownership.zip

Actual Outcome

The object is in an earlier, wrong position for a frame during ownership changes.
Does not happen with full precision on the ClientNetworkTransform.

Expected Outcome

It should behave just like with full precision enabled. Just a short hiccup during ownership change due to network delay, but without the one frame flicker.

Environment

  • OS: Windows 10
  • Unity Version: 2021.3.24f1
  • Netcode Version: 1.5.1 (but also tested with develop branch, same behaviour)

Additional Context

Possible workarounds: disable half precision, enable interpolation, don't change ownership during movement
This is not an urgent requirement for my project, I just noticed it by accident because I had interpolation disabled due to another issue in the past.

Metadata

Metadata

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions