- Home /
Question by
Karsnen_2 · Jun 18, 2012 at 04:08 PM ·
rotationrigidbodytransformhingejoint
How to find the angle of a rotation?
Hello,
I would like to add force depending upon the angle of rotation of the rigidbody. The rigidbody also has a hinge joint.
Hence how would I find the angle across 'x' or 'y' or 'z' angle.
Thanks guys.
Comment
Best Answer
Answer by whydoidoit · Jun 18, 2012 at 04:14 PM
Well the vector of rotation is available in transform.forward
which is probably what you want for adding a force. You can get the angles from transform.rotation.eulerAngles