Tag: box2d jbox2d

碰撞后如何使两个身体粘住?

我真的坚持这个我能成功地发现碰撞,但是我不能让两个身体参与碰撞。 这是我的ContactListener world.setContactListener(listener); listener = new ContactListener() { @Override public void preSolve(Contact contact, Manifold oldManifold) { } @Override public void postSolve(Contact contact, ContactImpulse impulse) { } //called when two fixtures cease to touch @Override public void endContact(Contact contact) { Fixture fixtureA = contact.getFixtureA(); Fixture fixtureB = contact.getFixtureB(); Gdx.app.log(“beginContact”, “between” + fixtureA.toString() + “and” + fixtureB.toString()); […]