Getting the movement direction relative to the rotation of the player.

Im trying to create a twin stick shooter. The movement and rotation for my player already works im try to implement animations so that the player will move forward, backwards, left and right. Obviously since the player can rotate using the right joystick Im not sure how I can determine the exact movement that the player is moving towards. I was wondering how exactly would I be able to do this.
Any ideas?