First of all, Vector3 is a data type, and doesn’t imply which type of data it is. It can be a position:

```
var place : Vector3 = Vector3(10.0, 13.5, 101.2);
transform.position = place;
```

or it can be a rotation in degrees:

```
var angleDirection : Vector3 = Vector3(0, 180, 270);
transform.rotation.eulerAngles = angleDirection;
```

//or it can be a rotation as a euler:

```
var eulerDirection : Vector3 = Vector3(0.12, 0.35, 0.8734);
transform.rotation = Quaternion.Euler(eulerDirection);
```

All rotations are stored as Quaternions but we want to deal with them as Eulers or degree rotations, so we need to convert them back and forth.

Quaternion to Angle in Degrees:

```
var degreeAngle : Vector3 = transform.rotation.eulerAngles;
Debug.Log("degreeAngle = "+degreeAngle);
```

degreeAngle = (0.0, 157.6, 0.0)

This is as far as I’ve gotten. The other conversions I need to know are:

Euler to Degrees
Degrees to Euler
Quaternion to Euler
Euler to Quaternion

Does anyone have this on the tip of their tongue and could let me know?

Sycle
February 5, 2010, 10:56pm
2
Hrrm, now I’m confused, I thought Euler angles were in degrees, not radians.

Sycle, it’s way worse than using radians instead of degrees!
:twisted:

Eulers are very confusing. This link explains what they actually are:

According to Euler's rotation theorem, any rotation may be described using three angles. If the rotations are written in terms of rotation matrices D, C, and B, then a general rotation A can be written as A=BCD. (1) The three angles giving the...

This is why conversion is so important! This is MUST KNOW material!

Sycle
February 6, 2010, 12:05am
4
I’m familiar with Euler angles, where you lost me is how they’re different to rotating something by degrees?

Your example was

```
var eulerDirection : Vector3 = Vector3(0.12, 0.35, 0.8734);
transform.rotation = Quaternion.Euler(eulerDirection);
```

which I thought you might be specifying in radians, but since Quaternion.Euler takes a vector specified in degrees, to get an equivalent result to the first example you’d use

```
var eulerDirection : Vector3 = Vector3(0, 180, 270);
transform.rotation = Quaternion.Euler(eulerDirection);
```

ie, no conversion required. This is why I’m confused.