I can't get PolygoneShape to draw correctly. Here is some of my trimmed code:
What are your suggestions, I've been scratching my head for the past 5 or 6 hours. Also the collision as far as I can tell works great between everything so I can confirm that the positioning of said objects are correct.
Code: Select all
fd.shape = new box2d.b2PolygonShape();
fd.shape.SetAsBox(w/(scaleFactor*2), h/(scaleFactor*2), box2d.b2Vec2(centerX,centerY),angle*57.2957795);
...
function this.display(){
//Nothing I put here really works
//I have tried making an array of vertices but it doesn't work because
//The shape is detected as an edge (returns 2 when I do GetType) rather than a PolygonShape
}
What are your suggestions, I've been scratching my head for the past 5 or 6 hours. Also the collision as far as I can tell works great between everything so I can confirm that the positioning of said objects are correct.