diff options
| author | Tom Harley | 2018-09-03 23:34:21 +0100 |
|---|---|---|
| committer | Tom Harley | 2018-09-03 23:36:01 +0100 |
| commit | 5440734d820606b29a795c46172ade5d7eba8efb (patch) | |
| tree | 85867f40afb02cfa2a5028b515ed0a195866b7e9 /Assets/Scripts/FollowPlayer.cs | |
| download | powerless-5440734d820606b29a795c46172ade5d7eba8efb.tar.gz powerless-5440734d820606b29a795c46172ade5d7eba8efb.zip | |
Initial commit
Diffstat (limited to 'Assets/Scripts/FollowPlayer.cs')
| -rw-r--r-- | Assets/Scripts/FollowPlayer.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Assets/Scripts/FollowPlayer.cs b/Assets/Scripts/FollowPlayer.cs new file mode 100644 index 0000000..096fd4d --- /dev/null +++ b/Assets/Scripts/FollowPlayer.cs @@ -0,0 +1,12 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class FollowPlayer : MonoBehaviour { + public GameObject player; + public Vector3 offset = new Vector3(0, 0, -10); + + void LateUpdate() { + transform.position = player.transform.position + offset; + } +} |
