Unity3D学习-相机跟踪

public class FollowPlayer : MonoBehaviour
{
    Transform m_player;
    float speed = 20;
    Vector3 m_offset;
    // Start is called before the first frame update
    private void Awake()
    {
        m_player = GameObject.FindWithTag(Tag.player).transform;
        m_offset =  transform.position- m_player.position;
        
    }
    private void Update()
    {
        transform.position = Vector3.Lerp(transform.position, m_offset + transform.position, speed * Time.deltaTime);
    }
}

上一篇:Activiti 7 如何接入自己系统的身份管理


下一篇:工作流引擎发展脉络整理