- Home /
Question by
ericelbracista · Jan 28, 2020 at 06:53 PM ·
rotationrelativerelative rotation
Add rotation from an angle
I'm asking if it's possible to add a rigidbody.Torque from an angle, example: if an object is in the angle 70y from an object, add a rotation in the x angle relative from the first object to the last. Thanks for reading and sorry if I didn't explained myself well, I don't know so much about English.
Comment
Best Answer
Answer by sacredgeometry · Jan 28, 2020 at 11:50 PM
You could create a quaternion using this https://docs.unity3d.com/ScriptReference/Quaternion.AngleAxis.html
Then convert it into a Euler angle/ Vector https://docs.unity3d.com/ScriptReference/Quaternion-eulerAngles.html
Then use it in AddTorque