I think I understand, but I have work so I don't have time to be sure or try to implement it, I'll try when I get back. Currently my code for momvement is as follows:
if(Game.GetInput().IsKeyDown(sf::Key::A))
{
if(myBox.body->GetLinearVelocity().x > 0)
{
myBox.yVel = myBox.body->GetLinearVelocity().y;
myBox.body->SetLinearVelocity(b2Vec2(0,myBox.yVel));
}
myBox.body->ApplyForce(b2Vec2(-75, 0), b2Vec2(myBox.position.x, myBox.position.y));
}
and that along with other input is in the game loop. so If i put the first example you showed me along with this code in the while loop it should stop all movement on the key release correct?
Thanks for all the help by the way, sorry this post is a little vague and rushed.
Joe