Polygons in Immediate Drawing are only 2D
Hey,
I wanted to draw a polygon that is always in front of the camera in the Immediate-Drawing mode. I created a PolygonPath and added my Vector3 points to this list. But after calling the Draw.Polygon(PolygonPath pgp, ...) method in the OnPostRender method the polygon appeared always in the z plane.
In fact, after diving into the source code of Shapes, I found in "PolygonPath.cs" that it has a List<Vector2> and that's probably why it's always at z=0. Would be great if I could also add Vector3 to the PolygonPath!
Thanks in advance for a fix!
Tim
Polygons are by design only 2D, because triangulation is ambiguous and undefined unless the vertices lie in a single plane
However! you can still set the position and rotation and all that of the polygon by using the Draw matrix