aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Assets/Scripts/Controllers/CameraController.cs
diff options
context:
space:
mode:
authorCarson Katri <carson.katri@gmail.com>2021-06-12 18:06:04 -0400
committerCarson Katri <carson.katri@gmail.com>2021-06-12 18:06:04 -0400
commit67c86ed960cc5feaedd06569ad62a340cc0d013f (patch)
treec5408bb4dd3b6df4a6b6e88fa41ee9875d3201e4 /Assets/Scripts/Controllers/CameraController.cs
parent71e603101369cf4a144904a2fc0e45ad3f862296 (diff)
downloadgmtk-gamejam-67c86ed960cc5feaedd06569ad62a340cc0d013f.tar.gz
gmtk-gamejam-67c86ed960cc5feaedd06569ad62a340cc0d013f.tar.zst
gmtk-gamejam-67c86ed960cc5feaedd06569ad62a340cc0d013f.zip
Functional AI that can dribble, steal, and shoot
Diffstat (limited to 'Assets/Scripts/Controllers/CameraController.cs')
-rw-r--r--Assets/Scripts/Controllers/CameraController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assets/Scripts/Controllers/CameraController.cs b/Assets/Scripts/Controllers/CameraController.cs
index a72b2f4..faffbe5 100644
--- a/Assets/Scripts/Controllers/CameraController.cs
+++ b/Assets/Scripts/Controllers/CameraController.cs
@@ -5,10 +5,11 @@ namespace Controllers
public class CameraController : MonoBehaviour
{
[SerializeField] private Transform target;
+ [SerializeField] private float speed;
private void Update()
{
- transform.position = new Vector3(target.transform.position.x, target.transform.position.y, -10f);
+ transform.position = Vector3.MoveTowards(transform.position, new Vector3(target.transform.position.x, target.transform.position.y, -10f), Time.deltaTime * speed);
}
}
}