Are there any fixtures in jbox2d? I cant find it...
Fixtures in Jbox?
Javanot sure what exactly you mean, little more detail would be helpful... thats how you use fixtures in jbox2d:
Code:
FixtureDef fixtureDef = new FixtureDef();
fixtureDef.shape = myShape;
fixtureDef.density = 2.0f;
fixtureDef.friction = 0.2f;
fixtureDef.restitution = 0.3f;
myBody.createFixture(fixtureDef);
fixtureDef.shape = myShape;
fixtureDef.density = 2.0f;
fixtureDef.friction = 0.2f;
fixtureDef.restitution = 0.3f;
myBody.createFixture(fixtureDef);
OK, i got it. I was using the jbox 2.0.1 for android, now got it... another question: how can i get the verticles of shape?
either by
or by
Code:
Vec2 v[] = shape.getVertices();
or by
Code:
for (int n = 0; n < shape.getVertexCount(); n++) {
Vec2 v = shape.getVertex(n);
}
Vec2 v = shape.getVertex(n);
}
Hmm... I think Its for the 2.1.2, and im using 2.0.1, becouse 2.1.2 is not working for me... Any Ideas for 2.0.1??
no fixtures in 2.0.1, that's a different api
Original thread: https://box2d.org/forum/viewtopic.php?t=7650