Have a problem with synchrinization of rotation for two objects: if main object rotated - the second must do same rotation in world space no matter of it’s direction.
That’s how i;m trying to do:
if (lastLocalRot == curLocalRot) return; Quaternion qt = Quaternion.RotateTowards (lastQuaternion, curQuaternion, 10f); qt.ToAngleAxis(out angle, out axis); Vector3 newpos mainTranform.TransformDirection(axis); Vector3 posSec secondTransform.InverseTransformDirection(newpos); Quaternion qt2 Quaternion.AngleAxis (angle, posSec); secondTransform.rotation *=qt2;
The result = second object rotated around axis with right direction, but angle is very high, and it rotating very fast.
There is an example in attach. To see where the problem is - run, use rotation tool in edit screen? and rotate left model.