diff --git a/com.unity.cinemachine/Samples~/3D Samples/FlyAround.unity b/com.unity.cinemachine/Samples~/3D Samples/FlyAround.unity index 541842cd1..c44c63aa0 100644 --- a/com.unity.cinemachine/Samples~/3D Samples/FlyAround.unity +++ b/com.unity.cinemachine/Samples~/3D Samples/FlyAround.unity @@ -38,7 +38,6 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -182,6 +181,10 @@ PrefabInstance: to move forwards. WASD will move sideways and up/down. The right mouse button or second trigger will enter sprint mode.' objectReference: {fileID: 0} + - target: {fileID: 6668015293666917239, guid: d7425ed2047e64d8ea6ff79f20bd46f6, type: 3} + propertyPath: VisibleAtStart + value: 1 + objectReference: {fileID: 0} - target: {fileID: 9138370430051789472, guid: d7425ed2047e64d8ea6ff79f20bd46f6, type: 3} propertyPath: m_Name value: HelpUI diff --git a/com.unity.cinemachine/Samples~/3D Samples/MixingCamera.unity b/com.unity.cinemachine/Samples~/3D Samples/MixingCamera.unity index 3cafefb43..4bb91877d 100644 --- a/com.unity.cinemachine/Samples~/3D Samples/MixingCamera.unity +++ b/com.unity.cinemachine/Samples~/3D Samples/MixingCamera.unity @@ -38,7 +38,6 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -155,9 +154,7 @@ MonoBehaviour: Priority: Enabled: 0 m_Value: 0 - OutputChannel: - Enabled: 0 - m_Value: 1 + OutputChannel: 1 StandbyUpdate: 2 m_StreamingVersion: 20230301 m_LegacyPriority: 10 @@ -192,13 +189,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 45642581} + serializedVersion: 2 m_LocalRotation: {x: 0.012340746, y: -0.7069991, z: 0.012340746, w: 0.7069991} m_LocalPosition: {x: 9, y: 1.9, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1051405110} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 2, y: -90, z: 0} --- !u!1 &51139488 GameObject: @@ -234,9 +231,7 @@ MonoBehaviour: Priority: Enabled: 0 m_Value: 0 - OutputChannel: - Enabled: 0 - m_Value: 1 + OutputChannel: 1 StandbyUpdate: 2 m_StreamingVersion: 20230301 m_LegacyPriority: 10 @@ -276,13 +271,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 0, z: 0} - Lookahead: - Enabled: 1 - Time: 0.3 - Smoothing: 4 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0.2} DeadZone: @@ -293,6 +281,13 @@ MonoBehaviour: Size: {x: 0.38, y: 0.47} Offset: {x: 0, y: -0.68} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 0, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 1 + Time: 0.3 + Smoothing: 4 + IgnoreY: 0 --- !u!114 &51139491 MonoBehaviour: m_ObjectHideFlags: 0 @@ -305,13 +300,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 2, z: -6} TrackerSettings: BindingMode: 5 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 1.2, z: -6} --- !u!4 &51139492 Transform: m_ObjectHideFlags: 0 @@ -319,13 +314,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 51139488} - m_LocalRotation: {x: 0.00040955184, y: 0.9187456, z: 0.00095295743, w: -0.39484867} - m_LocalPosition: {x: 3.1151953, y: -4.2728024, z: 27.304634} + serializedVersion: 2 + m_LocalRotation: {x: 0.024943644, y: 0.916911, z: 0.058039602, w: -0.39406022} + m_LocalPosition: {x: 3.1151953, y: -5.0728025, z: 27.304634} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 200915499} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &200915497 GameObject: @@ -360,9 +355,7 @@ MonoBehaviour: Priority: Enabled: 0 m_Value: 0 - OutputChannel: - Enabled: 0 - m_Value: 1 + OutputChannel: 1 StandbyUpdate: 2 m_StreamingVersion: 20230301 m_LegacyPriority: 10 @@ -382,8 +375,8 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 CustomBlends: {fileID: 0} - Weight0: 0.9999921 - Weight1: 0.000007851271 + Weight0: 1 + Weight1: 0 Weight2: 0 Weight3: 0 Weight4: 0 @@ -397,6 +390,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 200915497} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 1.2379951, y: 6.3628025, z: -13.715502} m_LocalScale: {x: 1, y: 1, z: 1} @@ -405,7 +399,6 @@ Transform: - {fileID: 1967210318} - {fileID: 51139492} m_Father: {fileID: 0} - m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &200915500 MonoBehaviour: @@ -556,13 +549,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 742461950} + serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0.95, z: 0} - m_LocalScale: {x: 5, y: 4, z: 16} + m_LocalScale: {x: 16, y: 4, z: 16} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1051405110} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &901841662 GameObject: @@ -661,13 +654,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 901841662} + serializedVersion: 2 m_LocalRotation: {x: -0, y: 0.9961947, z: 0.08715578, w: 0} m_LocalPosition: {x: 0, y: -1.84, z: 7} - m_LocalScale: {x: 5, y: 2, z: 10} + m_LocalScale: {x: 16, y: 2, z: 10} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1051405110} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: -10, y: 180, z: 0} --- !u!1 &1051405109 GameObject: @@ -692,6 +685,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1051405109} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1.6, z: 53} m_LocalScale: {x: 1, y: 1, z: 1} @@ -702,7 +696,6 @@ Transform: - {fileID: 742461955} - {fileID: 45642583} m_Father: {fileID: 0} - m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1254209701 GameObject: @@ -789,13 +782,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1254209701} - m_LocalRotation: {x: -0.036060497, y: 0.91490656, z: -0.08390659, w: -0.39319897} - m_LocalPosition: {x: 4.8683195, y: 2.1499999, z: 14.077745} + serializedVersion: 2 + m_LocalRotation: {x: -0.03444964, y: 0.91524255, z: -0.08015842, w: -0.39334333} + m_LocalPosition: {x: 4.8683195, y: 2.09, z: 14.077745} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1254209705 MonoBehaviour: @@ -921,13 +914,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 0, z: 0} - Lookahead: - Enabled: 1 - Time: 0.6 - Smoothing: 5 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0.1} DeadZone: @@ -938,6 +924,13 @@ MonoBehaviour: Size: {x: 0.38, y: 0.47} Offset: {x: 0, y: -0.68} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 0, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 1 + Time: 0.6 + Smoothing: 5 + IgnoreY: 0 --- !u!114 &1967210316 MonoBehaviour: m_ObjectHideFlags: 0 @@ -950,13 +943,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 2.06, z: -6.71} TrackerSettings: BindingMode: 5 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 2, z: -6.71} --- !u!114 &1967210317 MonoBehaviour: m_ObjectHideFlags: 0 @@ -972,9 +965,7 @@ MonoBehaviour: Priority: Enabled: 0 m_Value: 0 - OutputChannel: - Enabled: 0 - m_Value: 1 + OutputChannel: 1 StandbyUpdate: 2 m_StreamingVersion: 20230301 m_LegacyPriority: 10 @@ -1009,13 +1000,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1967210314} - m_LocalRotation: {x: -0.036060497, y: 0.91490656, z: -0.08390659, w: -0.39319897} - m_LocalPosition: {x: 3.6303244, y: -4.212803, z: 27.793247} + serializedVersion: 2 + m_LocalRotation: {x: -0.034449648, y: 0.91524255, z: -0.08015842, w: -0.39334336} + m_LocalPosition: {x: 3.6303244, y: -4.2728024, z: 27.793247} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 200915499} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1997898700 PrefabInstance: @@ -1194,13 +1185,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2003513181} + serializedVersion: 2 m_LocalRotation: {x: -0.08715578, y: -0, z: -0, w: 0.9961947} m_LocalPosition: {x: 0, y: -1.84, z: -7} - m_LocalScale: {x: 5, y: 2, z: 10} + m_LocalScale: {x: 16, y: 2, z: 10} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1051405110} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0} --- !u!1001 &1570214456050329275 PrefabInstance: @@ -1273,3 +1264,13 @@ Rigidbody: m_CorrespondingSourceObject: {fileID: 878341184440332479, guid: 1ae780fa68e1a2d4fbf8ccd042067f66, type: 3} m_PrefabInstance: {fileID: 1570214456050329275} m_PrefabAsset: {fileID: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1380885699} + - {fileID: 1997898700} + - {fileID: 1254209704} + - {fileID: 1570214456050329275} + - {fileID: 1051405110} + - {fileID: 200915499} diff --git a/com.unity.cinemachine/Samples~/3D Samples/RunningRace.unity b/com.unity.cinemachine/Samples~/3D Samples/RunningRace.unity index 622f5c73f..859317192 100644 --- a/com.unity.cinemachine/Samples~/3D Samples/RunningRace.unity +++ b/com.unity.cinemachine/Samples~/3D Samples/RunningRace.unity @@ -38,7 +38,6 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -169,13 +168,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 1, z: 0} - Lookahead: - Enabled: 0 - Time: 0 - Smoothing: 0 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0} DeadZone: @@ -186,6 +178,13 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 1, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 --- !u!114 &14930838 MonoBehaviour: m_ObjectHideFlags: 0 @@ -241,13 +240,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 5, z: -10} TrackerSettings: BindingMode: 1 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 5, z: -10} --- !u!1 &26679981 GameObject: m_ObjectHideFlags: 0 @@ -636,13 +635,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 1, z: 0} - Lookahead: - Enabled: 0 - Time: 0 - Smoothing: 0 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0} DeadZone: @@ -653,6 +645,13 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 1, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 --- !u!114 &194279535 MonoBehaviour: m_ObjectHideFlags: 0 @@ -665,13 +664,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 5, z: -10} TrackerSettings: BindingMode: 1 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 5, z: -10} --- !u!4 &194279536 Transform: m_ObjectHideFlags: 0 @@ -937,6 +936,10 @@ PrefabInstance: propertyPath: Spline value: objectReference: {fileID: 381337818} + - target: {fileID: 7394770885881608446, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + propertyPath: m_SplineSettings.Spline + value: + objectReference: {fileID: 381337818} - target: {fileID: 7394770885881608447, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} propertyPath: m_Name value: Runner (1) @@ -1066,13 +1069,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 1, z: 0} - Lookahead: - Enabled: 0 - Time: 0 - Smoothing: 0 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0} DeadZone: @@ -1083,6 +1079,13 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 1, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 --- !u!114 &689268013 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1095,13 +1098,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 5, z: -10} TrackerSettings: BindingMode: 1 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 5, z: -10} --- !u!4 &689268014 Transform: m_ObjectHideFlags: 0 @@ -1316,15 +1319,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 886251e9a18ece04ea8e61686c173e1b, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 20, z: 0} - Lookahead: - Enabled: 0 - Time: 0 - Smoothing: 0 - IgnoreY: 0 CameraDistance: 10 DeadZoneDepth: 0 - Damping: {x: 1, y: 1, z: 1} Composition: ScreenPosition: {x: 0, y: 0} DeadZone: @@ -1335,6 +1331,13 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 20, z: 0} + Damping: {x: 1, y: 1, z: 1} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 --- !u!114 &926545935 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1618,6 +1621,10 @@ PrefabInstance: propertyPath: Spline value: objectReference: {fileID: 909308763} + - target: {fileID: 7394770885881608446, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + propertyPath: m_SplineSettings.Spline + value: + objectReference: {fileID: 909308763} - target: {fileID: 7394770885881608447, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} propertyPath: m_Name value: Runner (2) @@ -1632,6 +1639,17 @@ Transform: m_CorrespondingSourceObject: {fileID: 7394770885881608385, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} m_PrefabInstance: {fileID: 1188149635} m_PrefabAsset: {fileID: 0} +--- !u!114 &1188149637 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7394770885881608384, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + m_PrefabInstance: {fileID: 1188149635} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 29d5b71c25a12441dbb6f920533a92df, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1253974827 GameObject: m_ObjectHideFlags: 0 @@ -1743,17 +1761,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 6339991416873971457, guid: cb2ad19a440512b469ff0d5f39a8075d, type: 3} m_PrefabInstance: {fileID: 394391430} m_PrefabAsset: {fileID: 0} ---- !u!114 &1348193507 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 7394770885881608384, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} - m_PrefabInstance: {fileID: 460140531} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 29d5b71c25a12441dbb6f920533a92df, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1001 &1411556680 PrefabInstance: m_ObjectHideFlags: 0 @@ -1820,6 +1827,17 @@ Transform: m_CorrespondingSourceObject: {fileID: 6339991416873971457, guid: cb2ad19a440512b469ff0d5f39a8075d, type: 3} m_PrefabInstance: {fileID: 1950721340} m_PrefabAsset: {fileID: 0} +--- !u!114 &1595898288 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7394770885881608384, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + m_PrefabInstance: {fileID: 460140531} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 29d5b71c25a12441dbb6f920533a92df, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1707911442 GameObject: m_ObjectHideFlags: 0 @@ -1894,13 +1912,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 1, z: 0} - Lookahead: - Enabled: 0 - Time: 0 - Smoothing: 0 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0} DeadZone: @@ -1911,6 +1922,13 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 1, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 --- !u!114 &1707911445 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1923,13 +1941,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 5, z: -10} TrackerSettings: BindingMode: 1 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 5, z: -10} --- !u!4 &1707911446 Transform: m_ObjectHideFlags: 0 @@ -2049,7 +2067,7 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 - - m_Target: {fileID: 1348193507} + - m_Target: {fileID: 1595898288} m_TargetAssemblyTypeName: Unity.Cinemachine.Samples.RunnerController, Assembly-CSharp m_MethodName: ResetRace m_Mode: 1 @@ -2061,7 +2079,7 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 - - m_Target: {fileID: 2121353336} + - m_Target: {fileID: 1188149637} m_TargetAssemblyTypeName: Unity.Cinemachine.Samples.RunnerController, Assembly-CSharp m_MethodName: ResetRace m_Mode: 1 @@ -2221,6 +2239,10 @@ PrefabInstance: propertyPath: Spline value: objectReference: {fileID: 119660182} + - target: {fileID: 7394770885881608446, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + propertyPath: m_SplineSettings.Spline + value: + objectReference: {fileID: 119660182} - target: {fileID: 7394770885881608447, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} propertyPath: m_Name value: Runner (3) @@ -2363,6 +2385,10 @@ PrefabInstance: propertyPath: Spline value: objectReference: {fileID: 1293460385} + - target: {fileID: 7394770885881608446, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + propertyPath: m_SplineSettings.Spline + value: + objectReference: {fileID: 1293460385} - target: {fileID: 7394770885881608447, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} propertyPath: m_Name value: Runner (4) @@ -2462,13 +2488,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} m_Name: m_EditorClassIdentifier: - TargetOffset: {x: 0, y: 1, z: 0} - Lookahead: - Enabled: 0 - Time: 0 - Smoothing: 0 - IgnoreY: 0 - Damping: {x: 0.5, y: 0.5} Composition: ScreenPosition: {x: 0, y: 0} DeadZone: @@ -2479,6 +2498,13 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 + TargetOffset: {x: 0, y: 1, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 --- !u!114 &1975165803 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2491,13 +2517,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} m_Name: m_EditorClassIdentifier: - FollowOffset: {x: 0, y: 5, z: -10} TrackerSettings: BindingMode: 1 PositionDamping: {x: 1, y: 1, z: 1} AngularDampingMode: 0 RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 + FollowOffset: {x: 0, y: 5, z: -10} --- !u!4 &1975165804 Transform: m_ObjectHideFlags: 0 @@ -2641,17 +2667,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: dab5c7d4c32e743048dfca98e2d5914f, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &2121353336 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 7394770885881608384, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} - m_PrefabInstance: {fileID: 1188149635} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 29d5b71c25a12441dbb6f920533a92df, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1001 &7394770886618730977 PrefabInstance: m_ObjectHideFlags: 0 @@ -2708,6 +2723,10 @@ PrefabInstance: propertyPath: Spline value: objectReference: {fileID: 2090653184} + - target: {fileID: 7394770885881608446, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} + propertyPath: m_SplineSettings.Spline + value: + objectReference: {fileID: 2090653184} - target: {fileID: 7394770885881608447, guid: 6d9bd862503df4c5cb138f7efac40a12, type: 3} propertyPath: m_Name value: Runner diff --git a/com.unity.cinemachine/Samples~/3D Samples/ThirdPersonWithAimMode.unity b/com.unity.cinemachine/Samples~/3D Samples/ThirdPersonWithAimMode.unity index 3c99bfe88..b1e69968b 100644 --- a/com.unity.cinemachine/Samples~/3D Samples/ThirdPersonWithAimMode.unity +++ b/com.unity.cinemachine/Samples~/3D Samples/ThirdPersonWithAimMode.unity @@ -38,7 +38,6 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -364,7 +363,7 @@ MonoBehaviour: PivotOffset: {x: 0, y: 0, z: 1} AmplitudeGain: 1 FrequencyGain: 1 - mNoiseOffsets: {x: -765.3436, y: 412.4553, z: 513.0689} + m_NoiseOffsets: {x: -765.3436, y: 412.4553, z: 513.0689} --- !u!114 &334051334 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1092,6 +1091,7 @@ MonoBehaviour: m_EditorClassIdentifier: ScanRecursively: 1 SuppressInputWhileBlending: 1 + IgnoreTimeScale: 0 m_ControllerManager: Controllers: - Name: CursorLock @@ -1102,6 +1102,7 @@ MonoBehaviour: Gain: 1 LegacyInput: Cancel LegacyGain: 1 + CancelDeltaTime: 0 InputValue: 0 Driver: AccelTime: 0 @@ -1422,7 +1423,7 @@ MonoBehaviour: PivotOffset: {x: 0, y: 0, z: 1} AmplitudeGain: 0.5 FrequencyGain: 0.5 - mNoiseOffsets: {x: -765.3436, y: 412.4553, z: 513.0689} + m_NoiseOffsets: {x: -765.3436, y: 412.4553, z: 513.0689} --- !u!114 &1516615962 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1546,7 +1547,6 @@ MonoBehaviour: m_EditorClassIdentifier: BulletPrefab: {fileID: 3056719325741855433, guid: 31d678dfd458ff84d95d644dd3730cca, type: 3} MaxBulletsPerSec: 6 - PlayerRotationTime: 0.2 Fire: Value: 0 Center: 0 @@ -1831,26 +1831,26 @@ PrefabInstance: and aim. The camera is dirven by that - for this style of controller, there is no direct independent control of the camera direction. - + The camera is managed by a custom AimCameraRig camera manager, which activates the Aim camera when the right mouse button is down. It also changes the player rotation mode when aiming. - - The crosshair indicates - where the player is aiming. The red dot indicates the actual hit location - if a ray would be fired from the Player Aiming Core. When the crosshair - and the red dot do not align, this means there is an object between the player - and the aim point indicated by the crosshair. The crosshair is pulled apart - to indicate this. - + The crosshair indicates where + the player is aiming. The red dot indicates the actual hit location if a + ray would be fired from the Player Aiming Core. When the crosshair and the + red dot do not align, this means there is an object between the player and + the aim point indicated by the crosshair. The crosshair is pulled apart to + indicate this. + + - The cursor will be locked upon closing - the help window. To unlock, press the Escape key.' + The cursor will be locked upon closing the help + window. To unlock, press the Escape key.' objectReference: {fileID: 0} - target: {fileID: 6668015293666917239, guid: d7425ed2047e64d8ea6ff79f20bd46f6, type: 3} propertyPath: VisibleAtStart @@ -2498,6 +2498,18 @@ PrefabInstance: propertyPath: m_ControllerManager.Controllers.Array.data[6].Name value: Fire objectReference: {fileID: 0} + - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} + propertyPath: m_ControllerManager.Controllers.Array.data[4].Owner + value: + objectReference: {fileID: 1525634693} + - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} + propertyPath: m_ControllerManager.Controllers.Array.data[5].Owner + value: + objectReference: {fileID: 1525634693} + - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} + propertyPath: m_ControllerManager.Controllers.Array.data[6].Owner + value: + objectReference: {fileID: 1525634694} - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} propertyPath: m_ControllerManager.Controllers.Array.data[0].Enabled value: 1 @@ -2614,14 +2626,26 @@ PrefabInstance: propertyPath: m_ControllerManager.Controllers.Array.data[3].Input.LegacyInput value: Fire3 objectReference: {fileID: 0} + - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} + propertyPath: m_ControllerManager.Controllers.Array.data[4].Input.InputAction + value: + objectReference: {fileID: -5630151704836100654, guid: 1d6e640e716dc4ff6989b73d02023f2b, type: 3} - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} propertyPath: m_ControllerManager.Controllers.Array.data[4].Input.LegacyInput value: Mouse X objectReference: {fileID: 0} + - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} + propertyPath: m_ControllerManager.Controllers.Array.data[5].Input.InputAction + value: + objectReference: {fileID: -5630151704836100654, guid: 1d6e640e716dc4ff6989b73d02023f2b, type: 3} - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} propertyPath: m_ControllerManager.Controllers.Array.data[5].Input.LegacyInput value: Mouse Y objectReference: {fileID: 0} + - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} + propertyPath: m_ControllerManager.Controllers.Array.data[6].Input.InputAction + value: + objectReference: {fileID: -3679512165948668398, guid: 1d6e640e716dc4ff6989b73d02023f2b, type: 3} - target: {fileID: 7804758404662293724, guid: 4d8d7a9a98d3f4ac2967d48094ea010f, type: 3} propertyPath: m_ControllerManager.Controllers.Array.data[6].Input.LegacyInput value: Fire1 @@ -2982,12 +3006,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Priority: - Enabled: 0 - m_Value: 0 + Enabled: 1 + m_Value: 10 OutputChannel: 1 StandbyUpdate: 2 - m_StreamingVersion: 0 - m_LegacyPriority: 10 + m_StreamingVersion: 20230301 + m_LegacyPriority: 0 DefaultTarget: Enabled: 0 Target: @@ -3045,6 +3069,7 @@ MonoBehaviour: m_EditorClassIdentifier: ScanRecursively: 1 SuppressInputWhileBlending: 1 + IgnoreTimeScale: 0 m_ControllerManager: Controllers: - Name: Aim @@ -3055,6 +3080,7 @@ MonoBehaviour: Gain: 1 LegacyInput: Fire2 LegacyGain: 1 + CancelDeltaTime: 0 InputValue: 0 Driver: AccelTime: 0 diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Blue.mat b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Blue.mat new file mode 100644 index 000000000..de5da13cd --- /dev/null +++ b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Blue.mat @@ -0,0 +1,84 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 0.868 + - _Glossiness: 0.939 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 1 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.07058823, g: 0.93539995, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0.7529412, b: 0.30588236, a: 1} + m_BuildTextureStacks: [] diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Blue.mat.meta b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Blue.mat.meta new file mode 100644 index 000000000..329db00ce --- /dev/null +++ b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c6a36271c061714fb72ecb0d79d1177 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Checkerboard.mat b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Checkerboard.mat index b6f725970..97a2c570a 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Checkerboard.mat +++ b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Checkerboard.mat @@ -11,10 +11,9 @@ Material: m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _EMISSION + m_ValidKeywords: [] m_InvalidKeywords: [] - m_LightmapFlags: 1 + m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 @@ -79,6 +78,6 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 0.28676468, g: 0.28676468, b: 0.28676468, a: 1} + - _Color: {r: 0.17610055, g: 0.17610055, b: 0.17610055, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Grey.mat b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Grey.mat index b81dbd18c..72d2a23de 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Grey.mat +++ b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Grey.mat @@ -11,10 +11,9 @@ Material: m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _EMISSION + m_ValidKeywords: [] m_InvalidKeywords: [] - m_LightmapFlags: 1 + m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Materials/GreyTransparent.mat b/com.unity.cinemachine/Samples~/Shared Assets/Materials/GreyTransparent.mat index cb6e9d163..e13bb079e 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Materials/GreyTransparent.mat +++ b/com.unity.cinemachine/Samples~/Shared Assets/Materials/GreyTransparent.mat @@ -13,9 +13,8 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - _ALPHAPREMULTIPLY_ON - - _EMISSION m_InvalidKeywords: [] - m_LightmapFlags: 1 + m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Red.mat b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Red.mat index 9a382e486..18e55761d 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Materials/Red.mat +++ b/com.unity.cinemachine/Samples~/Shared Assets/Materials/Red.mat @@ -11,10 +11,9 @@ Material: m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _EMISSION + m_ValidKeywords: [] m_InvalidKeywords: [] - m_LightmapFlags: 1 + m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Prefabs/Bullet.prefab b/com.unity.cinemachine/Samples~/Shared Assets/Prefabs/Bullet.prefab index 89f465e54..923abf2d7 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Prefabs/Bullet.prefab +++ b/com.unity.cinemachine/Samples~/Shared Assets/Prefabs/Bullet.prefab @@ -24,6 +24,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3056719325741855433} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} @@ -31,7 +32,6 @@ Transform: m_Children: - {fileID: 5448289225919832422} m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &7562889651135581609 MonoBehaviour: @@ -50,7 +50,7 @@ MonoBehaviour: m_Bits: 1 Speed: 500 Lifespan: 3 - Stretch: 4 + Stretch: 6 --- !u!1 &3983918105985728820 GameObject: m_ObjectHideFlags: 0 @@ -62,7 +62,6 @@ GameObject: - component: {fileID: 5448289225919832422} - component: {fileID: 3673348395963163373} - component: {fileID: 5703190147139191979} - - component: {fileID: 3958683836928587776} m_Layer: 2 m_Name: Cylinder m_TagString: Untagged @@ -77,13 +76,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3983918105985728820} + serializedVersion: 2 m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.05, y: 0.25, z: 0.05} + m_LocalScale: {x: 0.05, y: 1, z: 0.05} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 3056719325741855445} - m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!33 &3673348395963163373 MeshFilter: @@ -135,26 +134,3 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &3958683836928587776 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3983918105985728820} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.1 - m_Height: 0.1 - m_Direction: 2 - m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697} diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimpleBullet.cs b/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimpleBullet.cs index da1e6cc13..194f62a8d 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimpleBullet.cs +++ b/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimpleBullet.cs @@ -10,10 +10,10 @@ public class SimpleBullet : MonoBehaviour public float Lifespan = 3; [Tooltip("Stretch factor in the direction of motion while flying")] - public float Stretch = 4; + public float Stretch = 6; float m_Speed; - float m_ScaleZ; + Vector3 m_SpawnPoint; void OnValidate() { @@ -21,15 +21,11 @@ void OnValidate() Lifespan = Mathf.Max(0.2f, Lifespan); } - void Awake() - { - m_ScaleZ = transform.localScale.z; - } - void OnEnable() { m_Speed = Speed; - SetStretch(Stretch); + m_SpawnPoint = transform.position; + SetStretch(1); StartCoroutine(DeactivateAfter()); } @@ -46,14 +42,19 @@ void Update() m_Speed = 0; SetStretch(1); } - t.position += m_Speed * Time.deltaTime * t.forward; + var deltaPos = m_Speed * Time.deltaTime; + t.position += deltaPos * t.forward; + + // Clamp the stretch to avoid the bullet stretching back past the spawn point. + // This code assumes that the bullet length is 1. + SetStretch(Mathf.Min(1 + deltaPos * Stretch, Vector3.Distance(t.position, m_SpawnPoint))); } } void SetStretch(float stretch) { var scale = transform.localScale; - scale.z = m_ScaleZ * stretch; + scale.z = stretch; transform.localScale = scale; } diff --git a/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimplePlayerShoot.cs b/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimplePlayerShoot.cs index 4627fb8fc..cdf4f3907 100644 --- a/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimplePlayerShoot.cs +++ b/com.unity.cinemachine/Samples~/Shared Assets/Scripts/SimplePlayerShoot.cs @@ -86,6 +86,9 @@ void Update() if (AimTargetManager != null) fwd = AimTargetManager.GetAimDirection(transform.position, fwd).normalized; + var pos = transform.position + fwd; + var rot = Quaternion.LookRotation(fwd, transform.up); + // Because creating and destroying GameObjects is costly, we pool them and recycle // the deactivated ones. The bullets deactivate themselves after a time. GameObject bullet = null; @@ -94,17 +97,16 @@ void Update() if (!m_BulletPool[i].activeInHierarchy) { bullet = m_BulletPool[i]; + bullet.transform.SetPositionAndRotation(pos, rot); m_BulletPool.Remove(bullet); } } // Instantiate a new bullet if none are found in the pool if (bullet == null) - bullet = Instantiate(BulletPrefab); + bullet = Instantiate(BulletPrefab, pos, rot); // Off it goes! m_BulletPool.Add(bullet); - bullet.transform.SetPositionAndRotation( - transform.position + fwd, Quaternion.LookRotation(fwd, transform.up)); bullet.SetActive(true); FireEvent.Invoke(); }