Box2d, what is the point of world.ClearForces ()?

I am using box2dweb version 2.1.a.3 (javascript, ported from flash) to create a game. Some examples I got from Google:

setInterval(
     function(){
          world.Step(1/60 , 10, 10)
          world.ClearForces()
     }
,1000/60)

I tried to delete the world.ClearForces () line , but everything was still. I wonder what the ClearForces () function does ? What problem can I get if I delete it like this? Thank!

+5
source share
1 answer

Flash Javascript, ClearForces Box2D. , ApplyForce , , ApplyForce , . , ClearForces . , , .

+2

All Articles