Beispiel #1
0
        void Awake()
        {
            lineRend = GetComponent <LineRenderer>();

            linePoints = new Vector3[2];

            // if not passed, try to find in parents
            if (!vrPointer)
            {
                vrPointer = GetComponentInParent <VrPointer>();
            }

            if (!vrPointer)
            {
                throw new System.Exception("VrPointer missing");
            }
        }
Beispiel #2
0
        void Start()
        {
            lineRend  = GetComponent <LineRenderer>();
            targetObj = transform.GetChild(0).gameObject;
            vrPointer = pointerHand.GetComponent <VrPointer>();

            if (lineRend == null)
            {
                Debug.LogError("Make sure the target has a Line Renderer");
            }

            // set number of points
            lineRend.positionCount = numArcPoints;

            // points vector
            arcPoints = new Vector3[numArcPoints];

            HideTarget();
        }
Beispiel #3
0
 void Awake()
 {
     vrPointer = GetComponent <VrPointer>();
 }