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

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

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