Animation direction

Hello everyone
i have a twin stick game when the first stick drives the movements and the second stick drives the rotation.

i need somehow to drive the animations from movement and current player rotation

Vector3 newDirection = new Vector3(h, 0, v);
Quaternion rotationAwareDirection = Quaternion.FromToRotation(Vector3.up, 
                                          transform.rotation.eulerAngles);

newDirection = rotationAwareDirection*newDirection;

_anim.SetFloat("Horizontal", newDirection.x);
_anim.SetFloat("Vertical", newDirection.z);

i was trying something like this but with no luck

i was in the right direction.
solved this way

Vector3 newDirection = new Vector3(h, 0, v);

newDirection = Quaternion.Euler(0, -transform.rotation.eulerAngles.y, 0) * newDirection;

_anim.SetFloat("Horizontal", newDirection.x);
_anim.SetFloat("Vertical", newDirection.z);