Pathfinding.NavmeshCut.IntPointToV3 C# (CSharp) Method

IntPointToV3() public method

public IntPointToV3 ( Pathfinding p ) : Vector3
p Pathfinding
return UnityEngine.Vector3
		public Vector3 IntPointToV3 (Pathfinding.ClipperLib.IntPoint p) {
			Int3 ip = new Int3((int)p.X,0,(int)p.Y);
			return (Vector3)ip;
		}
		

Usage Example

Ejemplo n.º 1
0
        public void OnDrawGizmos()
        {
            if (this.tr == null)
            {
                this.tr = base.transform;
            }
            List <List <IntPoint> > list = ListPool <List <IntPoint> > .Claim();

            this.GetContour(list);
            Gizmos.color = NavmeshCut.GizmoColor;
            Bounds  bounds = this.GetBounds();
            float   y      = bounds.min.y;
            Vector3 b      = Vector3.up * (bounds.max.y - y);

            for (int i = 0; i < list.get_Count(); i++)
            {
                List <IntPoint> list2 = list.get_Item(i);
                for (int j = 0; j < list2.get_Count(); j++)
                {
                    Vector3 vector = NavmeshCut.IntPointToV3(list2.get_Item(j));
                    vector.y = y;
                    Vector3 vector2 = NavmeshCut.IntPointToV3(list2.get_Item((j + 1) % list2.get_Count()));
                    vector2.y = y;
                    Gizmos.DrawLine(vector, vector2);
                    Gizmos.DrawLine(vector + b, vector2 + b);
                    Gizmos.DrawLine(vector, vector + b);
                    Gizmos.DrawLine(vector2, vector2 + b);
                }
            }
            ListPool <List <IntPoint> > .Release(list);
        }
All Usage Examples Of Pathfinding.NavmeshCut::IntPointToV3