public void TwistSwing()
    {
        Quaternion twist;
        Quaternion swing;

        QuaternionHelper.DecomposeQuaternion(t1.rotation, Vector3.up, out twist, out swing);

        t2.rotation = twist;
        t3.rotation = swing;
        t4.rotation = twist * swing;
    }
Example #2
0
 private void Start()
 {
     QuaternionHelper.DecomposeQuaternion(transform.rotation, Vector3.up, out yaw, out pitch);
 }