I have a body and I attach to him the following fixture:
Thing is that once I apply a linear impulse like this:
The body keeps on moving that way forever. I'm quite sure this code worked like 2 days ago, but I'm surely missing something pretty obvious here.
Thanks again!
Code:
b2CircleShape shape;
shape.m_p.Set(0, 0);
shape.m_radius = 1.0f;
b2FixtureDef fix;
fix.shape = &shape;
fix.density = 1.0f;
m_Body->CreateFixture(&fix);
m_Body->ResetMassData();
shape.m_p.Set(0, 0);
shape.m_radius = 1.0f;
b2FixtureDef fix;
fix.shape = &shape;
fix.density = 1.0f;
m_Body->CreateFixture(&fix);
m_Body->ResetMassData();
Thing is that once I apply a linear impulse like this:
Code:
m_Body->ApplyLinearImpulse( b2Vec2(50,0), m_Body->GetWorldCenter());
The body keeps on moving that way forever. I'm quite sure this code worked like 2 days ago, but I'm surely missing something pretty obvious here.
Thanks again!