コード例 #1
0
    // Start is called before the first frame update
    protected virtual void Start()
    {
        zooming = false;
        isZoom  = false;

        if (GameObject.FindObjectOfType <PointerRight>())
        {
            pointerRight = GameObject.FindObjectOfType <PointerRight>();
        }

        if (GameObject.FindObjectOfType <PointerLeft>())
        {
            pointerLeft = GameObject.FindObjectOfType <PointerLeft>();
        }

        distance = Vector3.Distance(this.transform.position, Vector3.zero);

        Debug.Log(distance);

        initialPosition = this.transform.position;

        distance *= .95f;

        Debug.Log("99/100: " + distance);
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        meshRenderer = false;
        if (GameObject.FindObjectOfType <PointerRight>())
        {
            pointerRight = GameObject.FindObjectOfType <PointerRight>();
        }

        if (GameObject.FindObjectOfType <PointerLeft>())
        {
            pointerLeft = GameObject.FindObjectOfType <PointerLeft>();
        }
    }