bug fix for ShapeRenderer

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

bug fix for ShapeRenderer

Postby Guich » Sun Dec 24, 2017 12:04 pm

Hi,

This class is great and helped a lot my development. I just found a bug in polygon(vertices, offset, count)

float firstX = vertices[0];
float firstY = vertices[1];

should be

float firstX = vertices[offset];
float firstY = vertices[offset+1];

HTH

guich
Guich
 
Posts: 42
Joined: Sun Dec 11, 2016 9:36 am

Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest