Closed ofZach closed 5 years ago
The bodyDef is only used before the body is created. This should do it, adding to updates I'm working on.
void ofxBox2dBaseShape::enableGravity(bool b) {
if (body) {
body->SetGravityScale(b ? 1 : 0);
}
else {
bodyDef.gravityScale = b ? 1 : 0;
}
}
this has been commented out
https://github.com/vanderlin/ofxBox2d/blob/4ff6400dd19ca5277ba1407bc309f3622040ac10/src/ofxBox2dBaseShape.cpp#L155-L157
potential fix might be: