fix: Tank Prefabs and Controllers restore compressRotation

This commit is contained in:
MrGadget 2024-07-24 08:22:43 -04:00
parent 0614d2ca5b
commit e7484bbd1f
6 changed files with 20 additions and 12 deletions

View File

@ -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:

View File

@ -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: []

View File

@ -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

View File

@ -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

View File

@ -149,7 +149,7 @@ void Reset()
GetComponent<Rigidbody>().isKinematic = true;
tankNTR = GetComponent<NetworkTransformReliable>();
tankNTR.compressRotation = false;
tankNTR.compressRotation = true;
#if UNITY_EDITOR
// For convenience in the examples, we use the GUID of the TankControllerUI prefab

View File

@ -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;