2
\$\begingroup\$

I have a question about using Box2D to simulate a physics-platformer. I manage to make the character move to the right and left, and jumping as well. However, jumping seems extremely slow when compared to most tile-based platformers.

Is there a way to speed up the jumping and falling of the player? I of course know from my basic physics lessons that 'heavier' objects don't fall faster in the real world, but is there a way to simulate this in Box2D?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Increase the gravity of the player for faster down, increase the force of the jump for faster up (and to compensate for the increase in gravity). \$\endgroup\$
    – House
    Commented Jan 8, 2013 at 17:41

1 Answer 1

6
\$\begingroup\$

You're likely simulating some kind of upward force greater than gravity to make the physics object "jump". Increasing the amount of force will allow the character to reach a higher velocity quickly. Likewise, increasing the force of gravity on the player will make them fall faster.

You can either increase gravity for the entire world, or apply an additional constant force to the player to simulate increased gravity.

Make sure you also increase the jump force when you increase gravity to allow the jump force to overcome the increase in gravity.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .