I've attempted to create collisions between bodies, but I'm not sure if I've created my first 'body' correctly.
My total entity is 53x26
From 14, 1 to 52, 10 should be a rectangle
From 14, 14 to 51, 11 should be a rectangle
From 15, 15 to 50, 21 should be another rectangle
From 27, 22 to 44, 25 should be another rectangle
I've given it a try but I'm not sure that's it's correct, some clarification would help.
Code:
CompoundShape player_body = new CompoundShape();
player_body.add(new Rectangle(38f, 9f).setOffset(14f, 1f, 0f));
player_body.add(new Rectangle(37f, 3f).setOffset(14f, 11f, 0f));
player_body.add(new Rectangle(35f, 6f).setOffset(15f, 15f, 0f));
player_body.add(new Rectangle(17f, 3f).setOffset(27f, 22f, 0f));
Body<?> new_body = new Body(player_body, player.getPositionX(), player.getPositionY())
{ };
world.add(new_body);
Thanks a bunch!