piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.88k stars 236 forks source link

applyForce applyLinearImpulse waste time applying a zero force #183

Open bobcgausa opened 3 years ago

bobcgausa commented 3 years ago

the other force functions do not exhibit this behavior select examples 2 and 5 from the following iforces constant motion tutorial https://editor.p5js.org/Bobcook47/sketches/dl63nTD8q

observe that velocity is continuously updated even when the object is stopped

and a mystery, at least to me observe that when the box collides with the vertical wall on either side, its angle transforms to 0.02 and never changes?

shakiba commented 3 years ago

I wasn't able to see the problem in your example

Toby222 commented 3 years ago

image note that the -0.00 values flicker