Question by
dniwe_kore · Oct 17, 2017 at 06:29 PM ·
c#quaternionangleseuler angleshealth
Annoying Quaternions and Eulers
private Vector3 v3;
void Start () {
v3 = new Vector3 (0f, 359f, 0f);
Debug.Log ("" + transform.rotation.eulerAngles);
Debug.Log ("" + v3);
transform.Rotate (v3);
}
// Update is called once per frame
void FixedUpdate () {
v3.y = v3.y + 3f;
transform.Rotate (v3);
Debug.Log ("tr " + transform.rotation.eulerAngles);
Debug.Log ("v3 " + v3);
v3 = transform.rotation.eulerAngles;
Debug.Log ("---------------------------------------------------");
}
and here is my log:
359 degree + 3 becomes 1 degree, 5 + 3 becomes 13, 13 + 3 becomes 29 i just have no idea
screenshot-42.png
(39.4 kB)
Comment
Best Answer
Answer by dniwe_kore · Oct 17, 2017 at 06:46 PM
I am Idiot .Rotate do not apply new angles from arguments, it adds floats from arguments to existing angles floats
Your answer
![](https://koobas.hobune.stream/wayback/20220612141251im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to get local angle of travel 0 Answers
How to limit only one axis rotation? c# 1 Answer
Why raycast2d not work? 0 Answers
3D Game Kit, Health 0 Answers
Clamp a rotation in unity 0 Answers