Body stays in Air

Hi!
I have a "little" problem with a body. Im setting the linear velocity of the body to (5, body->getLinearVelocity().y)
If I create now a body, which is able to interact with my other body, which has a friction > 0, my first body, which is moved by setLinearVelocity, will stay in the air and... yeah. So slowly more detailed:
I have two bodies, one static the other one is moved by some event-stuff.
Now I trigger one of these events so the body moves. If the body is falling down and I move to the static one, the falling-body will stop falling. While i trigger the event it will stay there and stciks on the static one if the friction is bigger than zero.
What could be the reason of this problem?

Thanks for helping
It's hard to understand what you mean without a diagram, but can we assume the dynamic body is being pressed against the static one, which is a vertical wall?? And you are setting the linear velocity of the dynamic body like that very step, right?
Setting the sideways velocity to 5 is like throwing the dynamic body at the wall every time step - it may look like it is not moving, but inside the physics engine it's moving at 5 units per second. Maybe you could try applying a force, instead of setting the velocity directly.
Yes exactly.
If I use forces/impulses only, it will produce not the wished behaviour, but you gave me some ideas and now it looks fine.

Thanks for help 🙂

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