matter-js icon indicating copy to clipboard operation
matter-js copied to clipboard

Object on chain rotation

Open MariuszDabrowski opened this issue 8 years ago • 1 comments

Hey,

Take a look at the following example: https://codepen.io/MarioD/pen/53f84775d38a14e3ea506ca096fd3eb3

You will notice that the object at the end of the chain on the right hand side behaves very strangely. Pull around on it using the mouse and watch how it floats/rotates.

However, if you set the density to something very very small:

var rect1 = Bodies.rectangle(800, 500, 160, 20, {density: 0.000001});

You will see that it fixes this issue.

Why does that fix this issue? And if you wanted a higher density on the object, how would you go about it?

MariuszDabrowski avatar Jul 17 '17 20:07 MariuszDabrowski

the last body on the chain does not get proper constraints like the other bodies on a chain bridge in this example if you pull the bridge the last two bodies stick together ! chains in this example you can see the last part of chain acting independent from other parts !

AmirRafiee avatar Oct 23 '23 06:10 AmirRafiee