private static void RotateTransformRotation(Transform trn, float angle, Vector3 axis) { Quaternion rot = trn.localRotation * Quaternion.AngleAxis(angle, axis); QuatUtil.Normalize(ref rot); trn.localRotation = rot; }
internal override void AddMove(Quaternion rot, Transform translateTrn, float translationFactor, Transform rotationTrn, float rotationFactor) { if (State) { Quaternion newRot = rotationTrn.localRotation * Quaternion.AngleAxis( BASE_ROTATE_SPEED * rotationFactor, axis); QuatUtil.Normalize(ref newRot); rotationTrn.localRotation = newRot; } }