Set 2d player rotation on z to virtual joystick vector2 direction

Mostly self explanatory. I’m using a joystick pack from unity asset store and the joystick has a direction function as a vector 2. How would I go about setting my 2d top down player rotation to the direction vector 2?

Try to use transform.rotation = Quaternion.LookRotation(DirectionVector) on the player. If that looks in an other direction, try to offset the directionVector like so:

Vector2 offset = new Vector2();
transform.rotation = Quaternion.LookRotation(directionVector * offset);

And play around with the offset.