Creating a playable block that "rolls" around on tiles - Bloxorz remake

So I’m trying to recreate the old flash game “Bloxorz” in UE4. Not sure if I can post links here but its the first link on google. Hopefully this is the right section to post in.

I’ve created a few levels and everything polished up pretty well but I’m really having trouble getting the block to roll correctly.

Basically I need it so the rectangular block can only roll one direction at a time (forward or sideways) so that it is always lined up with the tiles. The block is 2 tiles wide while it is laying flat and one tile wide while it is standing up. Right now I have a movable block but it can slip and slide and becomes uneven with the tiles which makes it impossible to advance to the next level.

Any tips on accomplishing this?