Hi Experts,
I want to rotate the X and Y-axis, while fixing the Z-axis.
Test implementation is the below.
Update()
{
transform.Rotate(Time.deltaTime, Time.deltaTime, 0, Space.World)
}
I found that transform,eularAngles.z changes zero to another value gradually.
(My expectation is transform,eularAngles.z always zero.)
Please tell me how to rotate the X and Y-axis, while fixing the Z-axis.
Thanks,
Akira Ueda
Transform.Rotate
Transform.eulerAngles
larku
September 28, 2015, 5:48am
2
This has been asked millions of times, a quick google search will give you lots of answers:
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
Why does eularAngles.z change even if transform.Rotate (dx, dy, 0)?
Can you tell me what value it changes to? Quaternions and eulers are weird, and there is probably floating point imprecisions when the conversion is being done. Is the value jumping back and forth somewhere between 359 and 1? That might just be normal.