Rotating GameObject to mousePosition

You may be able to simply drive transform.forward (or transform.up when in 2D) equal to your movement vector.

Otherwise, use Mathf.Atan2() to derive heading from cartesian coordinates:

Sine/Cosine/Atan2 (sin/cos/atan2) and rotational familiarity and conventions