I am making a Box2d game for the iPhone. I need to apply a force on a body which represents my main character. The body is actually a rectangle on top of a circle connected using a revolute joint. I am using this as the skeleton for my character who is supposed to be running through the game(any suggestions or feedback on this too would be appreciated).
I need a force to be applied continuously so that it keeps him moving. What would be the best way to do this?
I am currently applying linear velocity inside the tick method.
_world->Step(dt, 10, 10);
if(gamestarted)
{
b2Vec2 force = b2Vec2(6, -3);
_bottomBody->SetLinearVelocity(force);
}
But will this force keep adding up and accelerate the body?