Reputation: 31
As title asks, can you change the center of mass of a body, or is it stuck with the automatic calculation of center?
I could probably do it with multiple fixtures, but is there another way to manually set the center?
Upvotes: 1
Views: 2193
Reputation: 191
You can set the center of mass like so
b2MassData* data;
body->GetMassData(data);
data->center.Set(0, 0);
body->SetMassData(data);
Upvotes: 1