List of usage examples for com.badlogic.gdx.physics.box2d WorldManifold getNormal
public Vector2 getNormal()
From source file:com.arkanoid.game.model.GameField.java
License:Apache License
public void processBallAndVausContact(Contact contact) { WorldManifold wm = contact.getWorldManifold(); Vector2 normal = wm.getNormal(); normal.x = normal.x * 1000000;/*from w w w.j ava 2s .c om*/ normal.y = normal.y * 1000000; for (int i = 0; i < 10; i++) { world.step(1 / 60f, 10, 10); ball.getBody().applyLinearImpulse(normal, ball.getBody().getPosition(), true); } getWorldListener().processBallAndVausContact(); }