Reputation: 5929
I apply force to the b2body, but would like to know is there a way to know what speed the b2body is after applyforce/applylinearimpulse?
b2Body* car;
b2Vec2 force = b2Vec2(0,100);
car->ApplyForce(force, car->GetPosition());
Upvotes: 3
Views: 4367
Reputation: 24846
After apply force to the center of mass:
v = F * t / m
. F - force, m - body mass, t - apply time. I think it will give good approximation if no damping is used.
I'm not so sure about impulse. But, imp = m * v
So by applying linear impulse to the center of mass you get imp/bodyMass
velocity increment
Upvotes: -1