Answers for "Float value = gameobject.rotation"
http://answers.unity.com/questions/1403033/float-value-gameobjectrotation.html
The latest answers for the question "Float value = gameobject.rotation"Answer by Glurth
http://answers.unity.com/answers/1403042/view.html
In 3d space one can rotate in lots of ways. When I nod my head in rotates one way, but when I shake my head, it rotates a different way.
The difference specifically, is, the "AXIS" around which my head is rotating.
If I turn my head down and to the right, is it rotated around BOTH of those axis.
In 3d space, one can define a rotation as 3 rotation angles around the three spaial axis (X, Y, Z). This format is known as "EULER angles".
I suspect you want to use ONE of the rotation's euler angles (though I've no idea WHICH one). e.g.
float rotAboutY = transform.eulerAngles.rotation.y; // this gets the rotataion around the Y axis, in degrees.Tue, 05 Sep 2017 18:27:55 GMTGlurthAnswer by unit_nick
http://answers.unity.com/answers/1403041/view.html
// assuming z is forwards you would rotate +/- 15 on z axis
float tippingAngle = 15;
// get a relative angle with range +/- instead of 0 - 360;
float relativeAngle = ((transform.rotation.eulerAngles.z + 540) % 360) -180;
if (Mathf.Abs(relativeAngle) >= tippingAngle)
{
// fall
}Tue, 05 Sep 2017 18:27:49 GMTunit_nick