I want to do the equivalent of:
v = Vector3( a, b, c ) * d;
... but for Quaternions. If d<1, I know I can do it with Quaternion.Slerp:
q = Quaternion.Euler( a, b, c );
q2 = Quaternion.Slerp( Quaternion.identity, q, d );
... but if d>1, I can't use that. The only way I can think of at the moment is to multiply the quaternion by itself many times (and then add a slerp for the remaining fraction):
q = Quaternion.Euler( a, b, c );
q2 = Quaternion.identity;
dInt = Mathf.Floor(d);
dRemainder = d - dInt;
for (var a=0;a<dInt;a++) {
q2 *= q;
}
q2 *= Quaternion.Slerp( Quaternion.identity, q, dRemainder );
But if d==508.4 or something, will that hog a lot of time doing 508 quaternion multiplications and a slerp? I will be doing this every frame (or in FixedUpdate). Is there a simpler way?