javascript - Vibration (shaking) elements in Box2D after using the Apply Force -


sorry bad english.

i little game in javascript using box2d (although think language not important, because engine same, known, , has been exported javascript).

connecting several bodies via distance joint. when creating joint pointing frequencyhz = 11 , dampingratio = 0 (as understand it, less dampingratio, faster item returns original position, is, spring tougher need). each body use force:

body.applyforce(new b2vec2(0, 5800), body.getworldcenter()) 

that needed have these bodies greater gravity others.

after creating several elements, begin twitch, vibrate if haunted, stop , engage in position.

i tried "play" parameters frequencyhz , dampingratio have joint, , sought design not twitch, construction seems less harsh , smoother.

there sort of solution?

thanks.

i think structure vibrating due fact weight of several elements, , power applicable them, object pulled down increasing length of joint, joint aimed szhimatsya original position, due vibration obtained, because element moves in different directions


Comments