vanderlin / ofxBox2d

Openframework wrapper for box2d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

disable rotating

opened this issue · comments

is it possible to disable the rotating of the boxes?

Yes very simple, just access the body and set SetFixedRotation(true);

auto rect = make_shared<ofxBox2dRect>();
rect->setPhysics(1.2, 1, 0.2);
rect->setup(box2d.getWorld(), ofGetWidth()/2, 100, 200, 200);
        
rect->body->SetFixedRotation(true);