Ok so I want to take the bounding box attachments and create a polygon, in order to use the class Intersector's polygon collision detection. I am close, but no matter what I do the polygon displayed by ShapeRenderer with
shapeRenderer.polygon(player.getPolygon().getTransformedVertices()); appears above the bounds displayed by SkeletonRendererDebug. I have the rotation already figured out just need to set the polygons position to that of the bounds.
I currently have this :
// These were invoked in the constructor of my player
bb = (BoundingBoxAttachment) skeleton.getAttachment("bb", "bb");
polygon = new Polygon(bb.getVertices());
// These are invoked every frame
bounds.update(skeleton, true);
polygon.setPosition(bounds.getPolygon(bb).get(0), bounds.getPolygon(bb).get(1));
Any ideas would be awesome!!
P.s I have also tried all other indexes beside 0 and 1 when setting position