using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollwCamera : MonoBehaviour
{
public Vector3 offset; // 把摄像机放在人物的子节点,得到的位置信息 得到后 再吧摄像机拖回原来的位置
private Transform player;
// Use this for initialization
void Start()
{
player = GameObject.FindGameObjectWithTag("Player").transform;
}
// Update is called once per frame
void Update()
{
transform.position = player.position + offset;
}
}