heyoa
i have problems when creating a polydef. everything worked fine with triangles, but when i try to create a pretty easy object the program just exits when the b2body is being created...
this is the object (1 to 6 are the points i used in the code...)
this is the code
any help would be greatly appreciated! 🙂
i have problems when creating a polydef. everything worked fine with triangles, but when i try to create a pretty easy object the program just exits when the b2body is being created...
this is the object (1 to 6 are the points i used in the code...)
Attachment:
File comment: the object

object.png [ 3.94 KiB | Viewed 404 times ]
object.png [ 3.94 KiB | Viewed 404 times ]
this is the code
Code:
polyDef.vertexCount = 6;
polyDef.vertices[0].Set(17.0f * scale, -22.0f * scale);
polyDef.vertices[1].Set(17.0f * scale, 5.0f * scale);
polyDef.vertices[2].Set(0.0f * scale, 5.0f * scale);
polyDef.vertices[3].Set(0.0f * scale, 22.0f * scale);
polyDef.vertices[4].Set(-18.0f * scale, 22.0f * scale);
polyDef.vertices[5].Set(-18.0f * scale, 23.0f * scale);
polyDef.vertices[0].Set(17.0f * scale, -22.0f * scale);
polyDef.vertices[1].Set(17.0f * scale, 5.0f * scale);
polyDef.vertices[2].Set(0.0f * scale, 5.0f * scale);
polyDef.vertices[3].Set(0.0f * scale, 22.0f * scale);
polyDef.vertices[4].Set(-18.0f * scale, 22.0f * scale);
polyDef.vertices[5].Set(-18.0f * scale, 23.0f * scale);
any help would be greatly appreciated! 🙂