예제 #1
0
    // Update is called once per frame
    void Update()
    {
        m_fCameraRate += Time.deltaTime * 0.02f;
        float   fRate = Mathf.PingPong(m_fCameraRate, 1.0f);
        Vector3 pos   = m_pBezier.GetLocation(fRate);

        Camera.main.transform.position = pos;
        Camera.main.transform.LookAt(m_pLookingAt);
    }