[libgdx][box2D] How to scale world (gravity,body) and camera

Hi,

I’m trying to do a Niddhog like or Eggnog like game using Libgdx and Box2D.

http://www.hostingpics.net/viewer.php?id=283632Capturedcran20151128170504.png

I need to implement a Q-learning AI but at this moment i’m blocked on the jump method. I shall like that my character jumps by top of an other character. At this moment i have scale down Character sprite to do an efficient jump.

So i have tried to do that :

body.applyLinearImpulse(new Vector2(6000,8000),body.getWorldCenter(), true);

but i dont get something efficient for big sprite / big body.

i have tried to apply a linearVelocity but same problem, and same with applyForceToCenter.

So i ask your help to solve this problem, should i camera zoom in and sprite scale down. Or there a solution to match world size/gravity with view.

I would like to do a fast jump but with a Vector(X,Y), like an angular impulse of 45°.

More details:



//screen details

renderer.setView(camera);
renderer.render();
world.step(1/15f, 6, 2);
camera = new OrthographicCamera(1024,680);

//character definition

BodyDef perso1 = new BodyDef();
perso1.type = BodyDef.BodyType.DynamicBody;
perso1.position.set(200,250);
perso1.bullet = true;
perso1.fixedRotation = true;
body = world.createBody(perso1);
perso_1.setBody(body);
		
PolygonShape shape = new PolygonShape();
shape.setAsBox(10, 10);
		
Gdx.input.setInputProcessor(controller);
		
FixtureDef fixtureDef = new FixtureDef();
fixtureDef.shape = shape;
fixtureDef.density = 0;
fixtureDef.restitution = -1;
fixtureDef.friction = 350;

Sorry for my bad english, i’m french :-\