Polygon shape rendering in LibGdx -


i created rectangle polygon this:

polyrect=new polygon(new float[]{0,0,width,0,width,height,0,height}); polyrect.setorigin(width,0); polyrect.setrotation(45f); polyrect.setposition(getx(),gety()); shaperenderer.polygon(polyswatter.gettransformedvertices()); 

it worked want draw inverted triangle this.

enter image description here

how can draw inverted triangle method?

you can set vertices in way, gives inverted triangle.

polyrect=new polygon(new float[]{width/2f,0,width,height,0,height}); polyrect.setorigin(width,0); //polyrect.setrotation(45f); polyrect.setposition(200,200); 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -