com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

fix: NetworkTransform teleport interpolating from last position on non-authoritative side [NCCBUG-166]

Open NoelStephensUnity opened this issue 3 years ago • 0 comments

This fixes the issue with NetworkTransform and Teleporting as well as can be considered a continuation of #2102 (this branch started from the fix/networktransform-Bitset-not-being-properly-reset branch) This includes several edge case scenarios where non-authoritative instances were still using states that were no longer being set (due to bitset fix). This also cleans up how change in local space is handled internally.

NCCBUG-166

Changelog

  • Fixed: Issue with the internal NetworkTransformState.m_Bitset flag not getting cleared upon the next tick advancement.
  • Fixed: Interpolation issue with NetworkTransform.Teleport.
  • Fixed: Issue where the authoritative side was interpolating its transform.

Testing and Documentation

  • Includes updates to existing NetworkTransform integration tests.
  • Includes new NetworkTransform integration tests.

Note:

The majority of the files in this PR are for manual testing purposes. This PR can be broken into three parts:

  1. The fixes and associated integration tests (3 files under com.unity.netcode.gameobjects)
  2. The fix for the memory leak error that has been happening randomly in the editor test: NetworkTimeTests.
  3. The manual test updates and additions (24 files under testproject)

The manual tests were left in this branch so anyone reviewing can visually/manually test the teleporting (Samples Menu -> Teleporting) as well as the rest of the scene loading tests to verify everything looks the same (and to run comparison and performance tests against develop branch).

NoelStephensUnity avatar Aug 08 '22 19:08 NoelStephensUnity