Exemplo n.º 1
0
    public void LookAtUpground2(Transform target, float rotateX, float rotateY, float minZoom = 0f)
    {
        Vector3 targetSize   = NormalSize.GetSize(target);
        Vector3 targetCenter = NormalCenter.GetCenter(target);

        norCenterGo.GetComponent <NormalTarget>().SetTarget(null);
        norCenterGo.position = targetCenter;
        float norDis = (targetSize.x + targetSize.z) / 2f * autoSizeScale + 300f;

        SetZoomLimit(minZoom, 2000);
        MoveTo(norDis, rotateX, rotateY, 0.5f);
    }
Exemplo n.º 2
0
    public void LookAtResAutoDisS(Transform target)
    {
        Vector3 targetSize   = NormalSize.GetSize(target);
        Vector3 targetCenter = NormalCenter.GetCenter(target);

        norCenterGo.position = targetCenter;
        float norDis = (targetSize.x + targetSize.z) / 2f + 150f;

        SetZoomLimit(0, 2000);
        MoveTo(norDis, 90f);
        canZoom = false;
        isMove  = false;
    }
Exemplo n.º 3
0
    public void LookAtUpGround3(Transform target)
    {
        Vector3 targetSize   = NormalSize.GetSize(target);
        Vector3 targetCenter = NormalCenter.GetCenter(target);

        norCenterGo.position = targetCenter;
        float norDis = (targetSize.x + targetSize.z) / 2f + 300f;

        SetZoomLimit(0, 2500);
        MoveTo(norDis, 30f);
        canZoom = true;
        isMove  = true;
    }
Exemplo n.º 4
0
    public void LookAtAreaAutoDis(Transform target)
    {
        if (target == null)
        {
            target = GameObject.Find("ModelRoot").transform;
        }
        Vector3 targetSize   = NormalSize.GetSize(target);
        Vector3 targetCenter = NormalCenter.GetCenter(target);

        norCenterGo.GetComponent <NormalTarget>().SetTarget(null);
        norCenterGo.position = targetCenter;
        float norDis = (targetSize.x + targetSize.z) / 2f * autoSizeScale;

        SetZoomLimit(0, 2000);
        MoveTo(norDis, 30f);
    }