# Trouble with Quaternion rotation in 360 axis degree

Good day. I met a problem, with that rotation, exactly in 360 degrees by one of the axis. (in my case- yAxis)
So, I got 2 point xPlane, getting angle in Quaternion, from last point to first, and after adding rotation by xAxis (that is always 90 degress) I got troubles only in 1 position, when get 360 degrees in yAxis rotation. At that moment my arrow starts to rotate in all axis by strange values, like 270, 90 degreesâ€¦

In my case I working with world space UI. Here is example at picture:

• step - clicking and put 1st point
• step - arrow following cursor. Here is going arrow rotation, and if I got 360 (or 0) degrees by y axis, I get that bug with rotations
• step - mouse click and set 2nd arrow point

I use
` transform.eulerAngles = new Vector3(90, followMouse.eulerAngles.y, 0);`
but anyway, if I calculate rotation from
`Quaternion followMouse = Quaternion.FromToRotation(Vector3.right, endPoint - startPoint);`
I got a bug in 360 degrees position. At that point that is
`Debug.Log: followMouse.eulerAngles.y: 1.332716E-05`

What to do? How to rotate correctly in 0/360 degrees?

I have found solution here and modified to my axis

``````wantDir = target.position - transform.position;
wantRot = ((Mathf.Atan2(wantDir.x, wantDir.z) * Mathf.Rad2Deg)-90);
transform.eulerAngles.y = wantRot;
``````