Question by
engfkaplan · Nov 11, 2018 at 06:47 AM ·
rotationangleeuleranglesrotation axistransform.rotation
How can i get Transform component rotation value which seen in editor inspector?
I want to limit object x rotation between 0,-45 according to Transform component x rotation value which seen in editor inspector. When i use below codes i get a value which between -1,1.I tried use eulerangle but its not same value in Transform component. How can i get Transform component rotation value which seen in editor inspector?
Transform t = turretBody.GetComponent();
Debug.Log(t.rotation.x);
Comment
Your answer
Follow this Question
Related Questions
Rotating an Object (To Face Another Object) Only on X and Y Axis 3 Answers
Quaternion Rotation - AngleAxis/EulerAngle 2 Answers
My rotation is not the same in inspector as it is in the scirpt 0 Answers
3D, Rotate gun towards mouse 0 Answers
Rotate a GameObject a fixed amount on key press struggles. Stops at 180. 1 Answer