I would like to get the shapes of my bodies, but I can't get anything, only null. Why?
Here is the relevant code section:
Body b;
while((b = box2d.physics.PhysicsWorld.world.getBodyList().getNext()) !=null) {
Shape shape;
while((shape = b.getShapeList().getNext()) != null) {
Log.e("name",""+b.getUserData().toString()+" "+shape+" ");
opengl.saveMatrix();
Meshes.select(b.getUserData().toString())
.translate((b.getPosition().x)*RATIO, (b.getPosition().y)*RATIO)
.rotate((int) ((int) b.getAngle() * (180 / Math.PI)), 0, 0, 1)
.draw(shape, 1, 1, 1);
opengl.loadMatrix();
}
}
shape = b.getShapeList().getNext() always returns null, and the log entry never ran.
