Im trying to make body move with increaseing speed. At first its starts to accelerate but it reaches a constant speed shortly after. How do I make it keep accelearte?
My code looks like this:
world = new World(new Vector2(0, 0), true);
if (Gdx.input.isKeyPressed(Input.Keys.D))
body.applyLinearImpulse(400f, 0, pos.x, pos.y, true);
if (Gdx.input.isKeyPressed(Input.Keys.A))
body.applyLinearImpulse(-400f, 0, pos.x, pos.y, true);
if (Gdx.input.isKeyPressed(Input.Keys.W))
body.applyLinearImpulse(0, 400f, pos.x, pos.y, true);
if (Gdx.input.isKeyPressed(Input.Keys.S))
body.applyLinearImpulse(0, -400f, pos.x, pos.y, true);