I've written a simple fov algorithm using raycas and updating a polygon in a separate viewport which i then use as a lightmask in a TextureRect.
However while testing the algorithm i noticed that sometimes i get an error and the polygon isn't drawn.
The error message is:
ERROR: VisualServerCanvas::canvasitemaddtrianglearray: Condition ' ps % 3 != 0 ' is true.
Is it the same as 'Bad Polygon'?
Just setting the polygon works fine and also drawing the polygon to the current viewport instead of a separate one, so i think it's an issue with rendering the viewport.
I'm currently using a 3.1 nightly build.
Appreciate any help.
Edit: Nevermind i'm just stupid and ended up adding the same vertex to the polygon multiple times. Disregard question.