Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector2[] box = new Vector2[4];
- box[1] = new Vector2(0 - bounds.getWidth() / 2 / Main.PPM, 0 - bounds.getHeight() / 2 / Main.PPM);
- box[0] = new Vector2( bounds.getWidth() / 2 / Main.PPM, 0 - bounds.getHeight() / 2 / Main.PPM);
- box[2] = new Vector2(0 - bounds.getWidth() / 2 / Main.PPM, bounds.getHeight() / 2 / Main.PPM);
- box[3] = new Vector2( bounds.getWidth() / 2 / Main.PPM, bounds.getHeight() / 2 / Main.PPM);
- ChainShape chainShape = new ChainShape();
- chainShape.createLoop(box);
- fdef.shape = chainShape;
- fixture = body.createFixture(fdef);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement