Skip to main content
Fixed formatting and added note about timestep.
Source Link
bornander
  • 4.7k
  • 1
  • 17
  • 27

A little overlap is to be expectedone with Box2D, try increasing the positionIterations parameter in the call to World.step (also consider experimenting with the velocityIterations parameter).

Increasing these values gives a more stable simulation with less collision overlap, but it comes at a performance cost.

You can also try stepping the World in smaller increments, Gaffer on Games's Fix Your Timestep has a good description on how to decouple the physics time from the render time.

Play around with the values and find the compromise that works best for you.

A little overlap is to be expectedone with Box2D, try increasing the positionIterations parameter in the call to World.step (also consider experimenting with the velocityIterations.

Increasing these values gives a more stable simulation with less collision overlap, but it comes at a performance cost.

Play around with the values and find the compromise that works best for you.

A little overlap is to be expectedone with Box2D, try increasing the positionIterations parameter in the call to World.step (also consider experimenting with the velocityIterations parameter).

Increasing these values gives a more stable simulation with less collision overlap, but it comes at a performance cost.

You can also try stepping the World in smaller increments, Gaffer on Games's Fix Your Timestep has a good description on how to decouple the physics time from the render time.

Play around with the values and find the compromise that works best for you.

Source Link
bornander
  • 4.7k
  • 1
  • 17
  • 27

A little overlap is to be expectedone with Box2D, try increasing the positionIterations parameter in the call to World.step (also consider experimenting with the velocityIterations.

Increasing these values gives a more stable simulation with less collision overlap, but it comes at a performance cost.

Play around with the values and find the compromise that works best for you.