From e65c54ef918ce08918638cef26d37cd063d1bedf Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Wed, 24 Jul 2024 08:22:43 -0400 Subject: [PATCH] fix: Tank Prefabs and Controllers restore compressRotation --- Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab | 10 ++++++---- .../Examples/TankTheftAuto/MirrorTankTheftAuto.unity | 8 ++++++++ .../Examples/TankTheftAuto/Prefabs/TankShared.prefab | 6 +++--- Assets/Mirror/Examples/Tanks/Prefabs/Tank.prefab | 2 -- .../Controllers/TankController/TankController.cs | 2 +- .../_Common/Controllers/TankController/TankTurret.cs | 4 ++-- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab b/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab index dfae63f9f..10d1fb4b4 100644 --- a/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab +++ b/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab @@ -150,7 +150,7 @@ MonoBehaviour: syncRotation: 1 syncScale: 0 onlySyncOnChange: 1 - compressRotation: 0 + compressRotation: 1 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 1 @@ -184,7 +184,7 @@ MonoBehaviour: syncRotation: 1 syncScale: 0 onlySyncOnChange: 1 - compressRotation: 0 + compressRotation: 1 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 1 @@ -218,7 +218,7 @@ MonoBehaviour: syncRotation: 1 syncScale: 0 onlySyncOnChange: 1 - compressRotation: 0 + compressRotation: 1 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 1 @@ -289,7 +289,7 @@ MonoBehaviour: syncDirection: 0 syncMode: 0 syncInterval: 0 - TurretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, type: 3} + turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, type: 3} projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, type: 3} animator: {fileID: 702109291319152264} turretNTR: {fileID: 8662002890669114756} @@ -396,6 +396,8 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: diff --git a/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity b/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity index 330e6ae01..3641ead94 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity +++ b/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity @@ -648,6 +648,10 @@ PrefabInstance: propertyPath: sceneId value: 2401096628 objectReference: {fileID: 0} + - target: {fileID: 160176459, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} + propertyPath: serverOnly + value: 0 + objectReference: {fileID: 0} - target: {fileID: 275309355690048611, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} propertyPath: m_IsActive value: 0 @@ -1032,6 +1036,10 @@ PrefabInstance: propertyPath: sceneId value: 2890115873 objectReference: {fileID: 0} + - target: {fileID: 160176459, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} + propertyPath: serverOnly + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab index 8bfea2340..52338b8c1 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab @@ -153,7 +153,7 @@ MonoBehaviour: syncRotation: 1 syncScale: 0 onlySyncOnChange: 1 - compressRotation: 0 + compressRotation: 1 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 1 @@ -187,7 +187,7 @@ MonoBehaviour: syncRotation: 1 syncScale: 0 onlySyncOnChange: 1 - compressRotation: 0 + compressRotation: 1 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 1 @@ -221,7 +221,7 @@ MonoBehaviour: syncRotation: 1 syncScale: 0 onlySyncOnChange: 1 - compressRotation: 0 + compressRotation: 1 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 1 diff --git a/Assets/Mirror/Examples/Tanks/Prefabs/Tank.prefab b/Assets/Mirror/Examples/Tanks/Prefabs/Tank.prefab index 941487590..f7d342944 100644 --- a/Assets/Mirror/Examples/Tanks/Prefabs/Tank.prefab +++ b/Assets/Mirror/Examples/Tanks/Prefabs/Tank.prefab @@ -86,7 +86,6 @@ MonoBehaviour: showOverlay: 0 overlayColor: {r: 0, g: 0, b: 0, a: 0.5} bufferResetMultiplier: 3 - changedDetection: 1 positionSensitivity: 0.01 rotationSensitivity: 0.01 scaleSensitivity: 0.01 @@ -121,7 +120,6 @@ MonoBehaviour: showOverlay: 0 overlayColor: {r: 0, g: 0, b: 0, a: 0.5} bufferResetMultiplier: 3 - changedDetection: 1 positionSensitivity: 0.01 rotationSensitivity: 0.01 scaleSensitivity: 0.01 diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs index 6f245a5a5..c56a30563 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs @@ -149,7 +149,7 @@ void Reset() GetComponent().isKinematic = true; tankNTR = GetComponent(); - tankNTR.compressRotation = false; + tankNTR.compressRotation = true; #if UNITY_EDITOR // For convenience in the examples, we use the GUID of the TankControllerUI prefab diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs index c04494cfe..ab930210b 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs @@ -210,7 +210,7 @@ Transform FindDeepChild(Transform aParent, string aName) // Ensure SyncDirection is Client to Server turretNTR.syncDirection = SyncDirection.ClientToServer; turretNTR.syncPosition = false; - turretNTR.compressRotation = false; + turretNTR.compressRotation = true; // Set SyncPosition to false because we only want to sync rotation //turretNTR.syncPosition = false; @@ -230,7 +230,7 @@ Transform FindDeepChild(Transform aParent, string aName) // Ensure SyncDirection is Client to Server barrelNTR.syncDirection = SyncDirection.ClientToServer; barrelNTR.syncPosition = false; - barrelNTR.compressRotation = false; + barrelNTR.compressRotation = true; // Set SyncPosition to false because we only want to sync rotation //barrelNTR.syncPosition = false;