예제 #1
0
        public void Setup(VectorLine line, bool makeBounds)
        {
            if (makeBounds)
            {
                VectorManager.SetupBoundsMesh(gameObject, line);
            }

            VectorManager.VisibilitySetup(transform, line, out m_objectNumber);
            m_vectorLine = line;
            VectorManager.DrawArrayLine2(m_objectNumber.i);
            StartCoroutine(VisibilityTest());
        }
        public void Setup(VectorLine line, bool makeBounds)
        {
            if (makeBounds)
            {
                VectorManager.SetupBoundsMesh(gameObject, line);
            }
            // Adjust points to this position, so the line doesn't have to be updated with the transform of this object
            // Also make sure the points are unique by creating a new list and copying the points over
            m_originalMatrix = transform.localToWorldMatrix;
            var thisPoints = new List <Vector3>(line.points3);

            for (int i = 0; i < thisPoints.Count; i++)
            {
                thisPoints[i] = m_originalMatrix.MultiplyPoint3x4(thisPoints[i]);
            }
            line.points3 = thisPoints;
            m_vectorLine = line;

            VectorManager.VisibilityStaticSetup(line, out m_objectNumber);
            StartCoroutine(WaitCheck());
        }