diff --git a/Assets/Prefabs/Camera1.prefab b/Assets/Prefabs/Camera1.prefab index a410fb4..3daf8ee 100644 --- a/Assets/Prefabs/Camera1.prefab +++ b/Assets/Prefabs/Camera1.prefab @@ -90,6 +90,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: y: 25 + offsetZ: -5 transitionDuration: .100000001 --- !u!124 &12432070 Behaviour: diff --git a/Assets/Prefabs/Camera2.prefab b/Assets/Prefabs/Camera2.prefab index ee958ec..2bf6064 100644 --- a/Assets/Prefabs/Camera2.prefab +++ b/Assets/Prefabs/Camera2.prefab @@ -90,6 +90,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: y: 25 + offsetZ: -5 transitionDuration: .100000001 --- !u!124 &12404998 Behaviour: diff --git a/Assets/Scripts/SquadCamera.cs b/Assets/Scripts/SquadCamera.cs index b4c535b..e1d8674 100644 --- a/Assets/Scripts/SquadCamera.cs +++ b/Assets/Scripts/SquadCamera.cs @@ -5,6 +5,7 @@ public class SquadCamera : MonoBehaviour { private Vector3 target; public float y = 25f; // store the height value since it will never change + public float offsetZ = -5f; public float transitionDuration = 2.5f; @@ -35,7 +36,7 @@ public class SquadCamera : MonoBehaviour { float t = 0.0f; Vector3 startingPos = transform.position; - Vector3 destination = new Vector3( target.x, y, target.z ); + Vector3 destination = new Vector3( target.x, y, target.z + offsetZ); // add the offset while (t < 1.0f) {