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.
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
Post a Comment