I’m not getting any errors either.

I am trying to take a eulerAngle and turn that into a vector3.

I want my gameobject to get it’s direction of movement depending on what it’s touching.

I am only trying to move on the z plane.

```
if (moving = true) {
float angle = Mathf.MoveTowardsAngle (transform.eulerAngles.z, moveDirection, MoveSpeed * Time.deltaTime);
transform.eulerAngles = new Vector3(0, 0, angle);
}
```

In the Inspector, try setting and gizmo-dragging the rotation in a few ways. You’ll notice the numbers will start doing odd things, like x will suddenly snap by 180 while y becomes negative… . It’s still the same angle, but the system decided this other way was better to write it.

So, and the docs say this, you really can’t “read then set” eulerAngles. The trick is to only read and change *your* variable, that won’t snap around:

```
float angle = 0; // global
angle = Mathf.MoveTowardsAngle(angle, ... );
```

Also, maybe this is just a typo, double-equals on `moving=true`

.

I got around it using trig…

```
float angleTest = 30;
float xMove = Mathf.Sin (Mathf.Deg2Rad * angleTest);
float yMove = Mathf.Cos (Mathf.Deg2Rad * angleTest);
Vector3 thatWay = new Vector3 (yMove, xMove, 0);
transform.Translate (thatWay * oldMoveSpeed * Time.deltaTime);
```

Seemed to work pretty well.