Moving a player as it should?

So at the moment i'm using ApplyForce to move a player, but it's bothering me that this function should be used to simulate an object pushing another object, but in the end, it's doing the trick.

The only problem i'm having, i have a world where my player is walking on, the friction of this world is set to 0, but once the player is standing still, it cannot start moving again, well, because the friction is 0 ...

So i thought about using SetLinearVelocity, now the player is moving great, but now he lost he's sense of gravity.
When i'm using SetLinearVelocity, it's moving in a horizontal direction without falling down.

Now my question is, is there a way to get the vertical position the player should be going, so i can still use SetLinearVelocotity.

Or is there a better way to move a player without losing its sense of gravity?
Just set the x component of linear velocity. Leave y alone.
so you mean like this:
Code:
direction = new b2Vec2();
//direction.x = ((500 / MapBox2D.RATIO) * xDirection)
direction.Set(((500 / MapBox2D.RATIO) * xDirection));
playerBody.SetLinearVelocity(direction);


for the record, i tried both things, but none of it is working, it just moves the player to the right and ignoring the gravity
Hmm i think i'll have the same problem soon. I've based my player movements on ApplyForce, I hope i wont have to change it just for an ice level ^^

Would it also work if you turn friction on during player input?
i believe you'll need to first wake up your body if you're using setLinearVelocity().. syntax is something like myB2body.WakeUp() .
That didn't work, i already had playerBody.AllowSleeping(false);
when you set the X to what you want to, you must also set the Y to what is already is. otherwise you are setting y to 0 when you just leave it out like that.
Well, that's was basically my question, is there a way of knowing what my y position should be
Well to explain to you what you are doing with the set linear velocity is setting the y on 0 all the time, thus setting any y linear velocity that it had back on 0.

so set the y of the direction variable to the vertical linear velocity of the player.

Code:
playerBody.SetLinearVelocity(new b2Vec2(((500 / MapBox2D.RATIO) * xDirection), playerBody.GetLinearVelocity().y));

Original thread: https://box2d.org/forum/viewtopic.php?t=5015