예제 #1
0
    public void LookAtBoos(Vector3 bossPosition)
    {
        Vector3    direction    = bossPosition - transform.position;
        Quaternion lookRotation = Quaternion.LookRotation(direction);

        cameraBaseControl.SetRotation(lookRotation);
    }
예제 #2
0
    protected void LookEnemy()
    {
        //look enemy
        Transform target = player.GetTarget("Enemy");

        if (target)
        {
            Vector3 lookEnemy = target.position - transform.position;
            cameraControl.SetRotation(Quaternion.LookRotation(lookEnemy));
        }
    }