Is it possible to constrain an object's rotation in worldspace?

I’m a beginner.

My player is a cube that moves by rotating 90 degrees on an axis (so if I constrained y rotation in inspector, it would disable part of my movement). If I change directions too soon before the rotation is finished, it has a tendency to rotate very slightly on the y axis, so that now when I move forward or back, I’m no longer parallel with the tiles I’m moving across.

Thanks in advance for any help you can offer.

Maybe the player input should be disabled before the rotation is complete ?

You can write the code so that every time the forward or back button is pressed down the rotation is set to exactly 90 degrees.

Keep at it! I just solo developed my first app and it’s now on Itunes and Android! It’s called Microbz!

https://itunes.apple.com/us/app/microbz/id1418937151?ls=1&mt=8
https://play.google.com/store/apps/details?id=com.peaceofmindgames.microbz

I hope my suggestion works and I hope you get a chance to try my game =)