aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts/FollowPlayer.cs
blob: 096fd4d8023ffa775c8b00593a488aea8360e631 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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;
  }
}