Flying pawn slides along the ground

I’m making a simple little rocket flying game. All the movement is working just fine, except that when it lands on the ground after running out of fuel, it can still move left/right on the floor, which I don’t want it to do.

The screenshot shows all the script that handles movement (not rotation, though it shouldn’t be related).

I’ve tried tweaking all sorts of settings in the movement component but nothing has helped.