using UnityEngine;
using System.Collections;
/*
* 摄像机与模型相对偏移量设置
*/
public class RoleOffset : MonoBehaviour {
public Transform targetRoleTransform;
private Vector3 offset;
// Use this for initialization
void Start()
{
offset = transform.position - targetRoleTransform.position;
}
// Update is called once per frame
void Update()
{
transform.position = offset + targetRoleTransform.position;
}
}