For @Simplebard arrow keys It splits the velocity into components parallel and perpendicular to the direction and applies different frictions to them, then adds them together again. It is so much better than my previous attempt.