How to force character to face direction before moving?

can you compare ship’s rotation with direction you want it to move and only then enable movement input?