Flying, rotating, landing... - matter physics

Hello,

I have some problems with creating a proper physics in my game (I use matter.js). The main feature of it, is possibility of flying and rotating around yourself.

The first problem is about proper landing. I would like to have player always perpendicular to platforms (see picture 3). Right now player just keeps falling on the curve platforms like he can’t maintain balance. I guess I should somehow compare angles of player and platform and make them equal, but how?

The second problem is shown on picture 2. Player is rotating on the ground and keeps moving thanks to that. I can easily disable it by detecting collision between player and platform, but I would like to disable it only when he is at the top of the platform. The question is how to detect which side of platform the player is colliding with?

jet