0

I'm still working on my Jump 'n' Run and have already solved the "can I jump" question.

My Question is now, how should I configure the Gravity, the Timesteps, the Fixturesize, the applied Impulse and the Fixturedensity for the most realistic result?.
The Fixturesize is now at 230x140 and can't be changed cause I need the pixelexact size for debugging. What can be changed is:

Gravity(10),

Timesteps(Deltatime*4);

applied Impulse(1000000);

Fixturedensity(0,002);

And why do I need an Impulse of 1 (!) million to move a current mass of 65kg?

Xerusial
  • 525
  • 1
  • 5
  • 17
  • Try these values, and if you don't like how the results look, adjust them one at a time. – Beta Mar 25 '13 at 22:35

1 Answers1

1

Please do not use pixelexact sizes, this will make the engine perform and act poorly. It's in mks (meters-kilograms-seconds). A 230x140 meter object is a little large. Also object speed is capped at around 200 m/s, so you won't get that moving very fast. If you need help with transforming, take a look at the OOBViewportTransform class, which is provided in the common package.

The impulse and density only matter in relation to other objects. So you might want to create a level first, and then test how your character interacts. Starting with densities of 1 is usually fine. You generally don't want to make either too high.

Daniel Murphy
  • 852
  • 7
  • 14
  • Thank you :) That was kind of what i was looking for ;) – Xerusial Mar 31 '13 at 11:27
  • there is no OOBViewportTransform class in LibGDX :/ – Xerusial Mar 31 '13 at 11:43
  • i have the class Box2ddebugrenderer in which i run the method: "render(world, matrix4)"... are the objects scaling up, if i change the matrix4? now, the matrix4 is set to "cam.combined". What do I need to change? ;) – Xerusial Mar 31 '13 at 11:57