Commit 2151772
fix: NetworkRigidbody authority and ownership detection (#1891)
* fix
MTT-3374
Initial changes for this fix.
* fix
Migrating the authority mode check to NetworkTransform since this is what dictates authority anyways.
* style
updated and added comments
* test
Adding ownership tests
* update
Realized we could further simplify NetworkRigidbody and added additional testing against owners not being Kinematic and non-owners being kinematic.
Also had to have the NetworkManager relative test prefab instances ignore each others' colliders so they wouldn't skew the position testing.
* style
whitespace fixes
* style
parameter name change
* style
better clarity in a comment
* update
This fixes an issue with not being able to find ClientNetworkTransform and makes the IsServerAuhtoritative internal.
* update
realized we don't need to save the original Kinematic state.
updated a comment
* update
needed to add COM_UNITY_MODULES_PHYSICS define in runtime and exclude the test if the physics module is not included.
* style
removing 2 CR/LF
* update
didn't need all of the changes made to the asmdef file
* style
removing xml doc API reference
* Update com.unity.netcode.gameobjects/Tests/Runtime/com.unity.netcode.runtimetests.asmdef
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
* Update com.unity.netcode.runtimetests.asmdef
* fix
Had to adjust the rigid body interpolation setting to be based on authority and not NetworkTransform.Interpolate (bug from this PR)
Had to re-adjust the original rigid body test to match the NetworkRigidbody change where when it is despawned physics is not applied.
* fix
Fixing edge case scenario with object parenting test.
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>1 parent bd9fbca commit 2151772
File tree
8 files changed
+404
-66
lines changed- com.unity.netcode.gameobjects
- Components
- Samples/ClientNetworkTransform/Scripts
- Tests/Runtime
- NetworkTransform
- Physics
- testproject/Assets/Tests/Runtime/ObjectParenting
8 files changed
+404
-66
lines changedLines changed: 56 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | | - | |
17 | | - | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | | - | |
31 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
35 | 57 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 58 | + | |
44 | 59 | | |
45 | 60 | | |
46 | | - | |
47 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
48 | 66 | | |
49 | | - | |
| 67 | + | |
50 | 68 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 69 | + | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 73 | + | |
63 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
64 | 83 | | |
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
68 | 87 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 88 | + | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
78 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
79 | 99 | | |
80 | 100 | | |
81 | 101 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
963 | 980 | | |
964 | 981 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
0 commit comments