I am currently using Box2d, more precisely the Java port jBox2d.
I have a circle that is colliding with other circles when falling (all those circles form a kind of a crank, see picture below).
Naturely, the circle begins to rotate when falling. But I would like to prevent it from rotating so that the friction is much higher.
To prevent body from rotating set fixedRotation = true at BodyDef or call setFixedRotation of Body (if you need run-time change behavior).
In the runtime you want to set set rotationfixed then
b2Body body;
body->SetFixedRotation(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With