JBox2D applyLinearImpulse doesn't work
- by Romeo
So i have this line of code:
if(input.isKeyDown(Input.KEY_W)&&canJump())
{
body.applyLinearImpulse(new Vec2(0, 30), cam.screenToWorld(body.getPosition()));
System.out.println("I can jump!");
}
My problem is that the console display I can jump! but the body doesn't do that. Can you explain to me if i do something…