yeah I don't see why not...
you would need to create a loop which checks if characters current state is idle & if so then get current mouse pos & do a bit of math (not my strong suit) to determine which direction the character should be aligned to.
check out this compass script & demo by einzelkaempfer:
https://www.visionaire-studio.net/shop/article/skript-demons... - the compass rotates around based on the current position of the mouse cursor in the scene. you could effectively take this script & modify it to suit your needs.