fix: NetworkTransform teleport interpolating from last position on non-authoritative side [NCCBUG-166]
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.
Changelog
- Fixed: Issue with the internal
NetworkTransformState.m_Bitsetflag 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:
- The fixes and associated integration tests (3 files under com.unity.netcode.gameobjects)
- The fix for the memory leak error that has been happening randomly in the editor test: NetworkTimeTests.
- 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).