Update #4
I (mostly) finalised the movement code, save for a few value tweaks that will come later.
Here is a little gif demonstrating the movement so far. (btw, the lines are just the collision points, I forgot to hide them for recording the gif)